Update to Chromium revision 220934.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1427 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-09-03 21:48:12 +00:00
parent 9e50918a30
commit 97dd8beb4f
18 changed files with 59 additions and 49 deletions

View File

@ -17,5 +17,5 @@
{ {
'chromium_url': 'http://src.chromium.org/svn/trunk/src', 'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '217791', 'chromium_revision': '220934',
} }

View File

@ -145,9 +145,11 @@ typedef struct _cef_context_menu_params_t {
struct _cef_context_menu_params_t* self); struct _cef_context_menu_params_t* self);
/// ///
// Returns true (1) if the context menu was invoked on a blocked image. // Returns true (1) if the context menu was invoked on an image which has non-
// NULL contents.
/// ///
int (CEF_CALLBACK *is_image_blocked)(struct _cef_context_menu_params_t* self); int (CEF_CALLBACK *has_image_contents)(
struct _cef_context_menu_params_t* self);
/// ///
// Returns the URL of the top level page that the context menu was invoked on. // Returns the URL of the top level page that the context menu was invoked on.

View File

@ -148,10 +148,11 @@ class CefContextMenuParams : public virtual CefBase {
virtual CefString GetSourceUrl() =0; virtual CefString GetSourceUrl() =0;
/// ///
// Returns true if the context menu was invoked on a blocked image. // Returns true if the context menu was invoked on an image which has
// non-empty contents.
/// ///
/*--cef()--*/ /*--cef()--*/
virtual bool IsImageBlocked() =0; virtual bool HasImageContents() =0;
/// ///
// Returns the URL of the top level page that the context menu was invoked on. // Returns the URL of the top level page that the context menu was invoked on.

View File

@ -29,7 +29,7 @@ BackingStoreOSR::BackingStoreOSR(content::RenderWidgetHost* widget,
device_scale_factor_(scale_factor) { device_scale_factor_(scale_factor) {
gfx::Size pixel_size = gfx::ToFlooredSize( gfx::Size pixel_size = gfx::ToFlooredSize(
gfx::ScaleSize(size, device_scale_factor_)); gfx::ScaleSize(size, device_scale_factor_));
device_.reset(new SkDevice(SkBitmap::kARGB_8888_Config, device_.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
pixel_size.width(), pixel_size.width(),
pixel_size.height(), pixel_size.height(),
true)); true));
@ -49,7 +49,8 @@ void BackingStoreOSR::ScaleFactorChanged(float scale_factor) {
gfx::Size pixel_size = gfx::ToFlooredSize( gfx::Size pixel_size = gfx::ToFlooredSize(
gfx::ScaleSize(size(), device_scale_factor_)); gfx::ScaleSize(size(), device_scale_factor_));
scoped_ptr<SkDevice> new_device(new SkDevice(SkBitmap::kARGB_8888_Config, scoped_ptr<SkBaseDevice> new_device(
new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
pixel_size.width(), pixel_size.width(),
pixel_size.height(), pixel_size.height(),
true)); true));

View File

@ -46,7 +46,7 @@ class BackingStoreOSR : public content::BackingStore {
const gfx::Size& size, float scale_factor); const gfx::Size& size, float scale_factor);
virtual ~BackingStoreOSR() {} virtual ~BackingStoreOSR() {}
scoped_ptr<SkDevice> device_; scoped_ptr<SkBaseDevice> device_;
scoped_ptr<SkCanvas> canvas_; scoped_ptr<SkCanvas> canvas_;
float device_scale_factor_; float device_scale_factor_;

View File

@ -367,7 +367,7 @@ void LoadTraceFile(CefRefPtr<CefFrameHostImpl> frame,
return; return;
std::string file_contents; std::string file_contents;
if (!file_util::ReadFileToString(path, &file_contents)) { if (!base::ReadFileToString(path, &file_contents)) {
frame->SendJavaScript( frame->SendJavaScript(
"tracingController.onLoadTraceFileCanceled();", std::string(), 0); "tracingController.onLoadTraceFileCanceled();", std::string(), 0);
return; return;

View File

@ -59,9 +59,9 @@ CefString CefContextMenuParamsImpl::GetSourceUrl() {
return const_value().src_url.spec(); return const_value().src_url.spec();
} }
bool CefContextMenuParamsImpl::IsImageBlocked() { bool CefContextMenuParamsImpl::HasImageContents() {
CEF_VALUE_VERIFY_RETURN(false, false); CEF_VALUE_VERIFY_RETURN(false, true);
return const_value().is_image_blocked; return const_value().has_image_contents;
} }
CefString CefContextMenuParamsImpl::GetPageUrl() { CefString CefContextMenuParamsImpl::GetPageUrl() {

View File

@ -24,7 +24,7 @@ class CefContextMenuParamsImpl
virtual CefString GetLinkUrl() OVERRIDE; virtual CefString GetLinkUrl() OVERRIDE;
virtual CefString GetUnfilteredLinkUrl() OVERRIDE; virtual CefString GetUnfilteredLinkUrl() OVERRIDE;
virtual CefString GetSourceUrl() OVERRIDE; virtual CefString GetSourceUrl() OVERRIDE;
virtual bool IsImageBlocked() OVERRIDE; virtual bool HasImageContents() OVERRIDE;
virtual CefString GetPageUrl() OVERRIDE; virtual CefString GetPageUrl() OVERRIDE;
virtual CefString GetFrameUrl() OVERRIDE; virtual CefString GetFrameUrl() OVERRIDE;
virtual CefString GetFrameCharset() OVERRIDE; virtual CefString GetFrameCharset() OVERRIDE;

View File

@ -81,6 +81,7 @@ void CefJavaScriptDialogManager::RunJavaScriptDialog(
content::JavaScriptMessageType message_type, content::JavaScriptMessageType message_type,
const string16& message_text, const string16& message_text,
const string16& default_prompt_text, const string16& default_prompt_text,
bool user_gesture,
const DialogClosedCallback& callback, const DialogClosedCallback& callback,
bool* did_suppress_message) { bool* did_suppress_message) {
CefRefPtr<CefClient> client = browser_->GetClient(); CefRefPtr<CefClient> client = browser_->GetClient();

View File

@ -29,6 +29,7 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
content::JavaScriptMessageType message_type, content::JavaScriptMessageType message_type,
const string16& message_text, const string16& message_text,
const string16& default_prompt_text, const string16& default_prompt_text,
bool user_gesture,
const DialogClosedCallback& callback, const DialogClosedCallback& callback,
bool* did_suppress_message) OVERRIDE; bool* did_suppress_message) OVERRIDE;

View File

@ -10,6 +10,7 @@
#include "libcef/browser/devtools_scheme_handler.h" #include "libcef/browser/devtools_scheme_handler.h"
#include "libcef/common/scheme_registration.h" #include "libcef/common/scheme_registration.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_constants.h" #include "content/public/common/url_constants.h"
#include "net/url_request/data_protocol_handler.h" #include "net/url_request/data_protocol_handler.h"
#include "net/url_request/file_protocol_handler.h" #include "net/url_request/file_protocol_handler.h"
@ -25,7 +26,10 @@ void InstallInternalProtectedHandlers(
protocol_handlers->insert( protocol_handlers->insert(
std::make_pair(chrome::kDataScheme, new net::DataProtocolHandler)); std::make_pair(chrome::kDataScheme, new net::DataProtocolHandler));
protocol_handlers->insert( protocol_handlers->insert(
std::make_pair(chrome::kFileScheme, new net::FileProtocolHandler)); std::make_pair(chrome::kFileScheme, new net::FileProtocolHandler(
content::BrowserThread::GetBlockingPool()->
GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
#if !defined(DISABLE_FTP_SUPPORT) #if !defined(DISABLE_FTP_SUPPORT)
protocol_handlers->insert( protocol_handlers->insert(
std::make_pair(chrome::kFtpScheme, std::make_pair(chrome::kFtpScheme,

View File

@ -25,32 +25,32 @@ bool CanGoBack(WebKit::WebView* view) {
if (!view) if (!view)
return false; return false;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view); WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
return (impl->page()->backForward()->backCount() > 0); return (impl->page()->backForward().backCount() > 0);
} }
bool CanGoForward(WebKit::WebView* view) { bool CanGoForward(WebKit::WebView* view) {
if (!view) if (!view)
return false; return false;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view); WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
return (impl->page()->backForward()->forwardCount() > 0); return (impl->page()->backForward().forwardCount() > 0);
} }
void GoBack(WebKit::WebView* view) { void GoBack(WebKit::WebView* view) {
if (!view) if (!view)
return; return;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view); WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
WebCore::BackForwardController* controller = impl->page()->backForward(); WebCore::BackForwardController& controller = impl->page()->backForward();
if (controller->backCount() > 0) if (controller.backCount() > 0)
controller->goBack(); controller.goBack();
} }
void GoForward(WebKit::WebView* view) { void GoForward(WebKit::WebView* view) {
if (!view) if (!view)
return; return;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view); WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
WebCore::BackForwardController* controller = impl->page()->backForward(); WebCore::BackForwardController& controller = impl->page()->backForward();
if (controller->forwardCount() > 0) if (controller.forwardCount() > 0)
controller->goForward(); controller.goForward();
} }
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame) { v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame) {

View File

@ -107,7 +107,7 @@ cef_string_userfree_t CEF_CALLBACK context_menu_params_get_source_url(
return _retval.DetachToUserFree(); return _retval.DetachToUserFree();
} }
int CEF_CALLBACK context_menu_params_is_image_blocked( int CEF_CALLBACK context_menu_params_has_image_contents(
struct _cef_context_menu_params_t* self) { struct _cef_context_menu_params_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -116,7 +116,7 @@ int CEF_CALLBACK context_menu_params_is_image_blocked(
return 0; return 0;
// Execute // Execute
bool _retval = CefContextMenuParamsCppToC::Get(self)->IsImageBlocked(); bool _retval = CefContextMenuParamsCppToC::Get(self)->HasImageContents();
// Return type: bool // Return type: bool
return _retval; return _retval;
@ -274,7 +274,7 @@ CefContextMenuParamsCppToC::CefContextMenuParamsCppToC(
struct_.struct_.get_unfiltered_link_url = struct_.struct_.get_unfiltered_link_url =
context_menu_params_get_unfiltered_link_url; context_menu_params_get_unfiltered_link_url;
struct_.struct_.get_source_url = context_menu_params_get_source_url; struct_.struct_.get_source_url = context_menu_params_get_source_url;
struct_.struct_.is_image_blocked = context_menu_params_is_image_blocked; struct_.struct_.has_image_contents = context_menu_params_has_image_contents;
struct_.struct_.get_page_url = context_menu_params_get_page_url; struct_.struct_.get_page_url = context_menu_params_get_page_url;
struct_.struct_.get_frame_url = context_menu_params_get_frame_url; struct_.struct_.get_frame_url = context_menu_params_get_frame_url;
struct_.struct_.get_frame_charset = context_menu_params_get_frame_charset; struct_.struct_.get_frame_charset = context_menu_params_get_frame_charset;

View File

@ -99,14 +99,14 @@ CefString CefContextMenuParamsCToCpp::GetSourceUrl() {
return _retvalStr; return _retvalStr;
} }
bool CefContextMenuParamsCToCpp::IsImageBlocked() { bool CefContextMenuParamsCToCpp::HasImageContents() {
if (CEF_MEMBER_MISSING(struct_, is_image_blocked)) if (CEF_MEMBER_MISSING(struct_, has_image_contents))
return false; return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute // Execute
int _retval = struct_->is_image_blocked(struct_); int _retval = struct_->has_image_contents(struct_);
// Return type: bool // Return type: bool
return _retval?true:false; return _retval?true:false;

View File

@ -40,7 +40,7 @@ class CefContextMenuParamsCToCpp
virtual CefString GetLinkUrl() OVERRIDE; virtual CefString GetLinkUrl() OVERRIDE;
virtual CefString GetUnfilteredLinkUrl() OVERRIDE; virtual CefString GetUnfilteredLinkUrl() OVERRIDE;
virtual CefString GetSourceUrl() OVERRIDE; virtual CefString GetSourceUrl() OVERRIDE;
virtual bool IsImageBlocked() OVERRIDE; virtual bool HasImageContents() OVERRIDE;
virtual CefString GetPageUrl() OVERRIDE; virtual CefString GetPageUrl() OVERRIDE;
virtual CefString GetFrameUrl() OVERRIDE; virtual CefString GetFrameUrl() OVERRIDE;
virtual CefString GetFrameCharset() OVERRIDE; virtual CefString GetFrameCharset() OVERRIDE;

View File

@ -1,8 +1,8 @@
Index: page/FrameView.cpp Index: page/FrameView.cpp
=================================================================== ===================================================================
--- page/FrameView.cpp (revision 156144) --- page/FrameView.cpp (revision 157102)
+++ page/FrameView.cpp (working copy) +++ page/FrameView.cpp (working copy)
@@ -189,10 +189,12 @@ @@ -187,10 +187,12 @@
if (!page) if (!page)
return; return;
@ -17,7 +17,7 @@ Index: page/FrameView.cpp
PassRefPtr<FrameView> FrameView::create(Frame* frame) PassRefPtr<FrameView> FrameView::create(Frame* frame)
Index: platform/mac/NSScrollerImpDetails.mm Index: platform/mac/NSScrollerImpDetails.mm
=================================================================== ===================================================================
--- platform/mac/NSScrollerImpDetails.mm (revision 156144) --- platform/mac/NSScrollerImpDetails.mm (revision 157102)
+++ platform/mac/NSScrollerImpDetails.mm (working copy) +++ platform/mac/NSScrollerImpDetails.mm (working copy)
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@

View File

@ -1,8 +1,8 @@
Index: public/web/WebView.h Index: public/web/WebView.h
=================================================================== ===================================================================
--- public/web/WebView.h (revision 156144) --- public/web/WebView.h (revision 157102)
+++ public/web/WebView.h (working copy) +++ public/web/WebView.h (working copy)
@@ -439,6 +439,7 @@ @@ -444,6 +444,7 @@
// Sets whether select popup menus should be rendered by the browser. // Sets whether select popup menus should be rendered by the browser.
WEBKIT_EXPORT static void setUseExternalPopupMenus(bool); WEBKIT_EXPORT static void setUseExternalPopupMenus(bool);
@ -12,9 +12,9 @@ Index: public/web/WebView.h
// Visited link state -------------------------------------------------- // Visited link state --------------------------------------------------
Index: Source/web/ChromeClientImpl.cpp Index: Source/web/ChromeClientImpl.cpp
=================================================================== ===================================================================
--- Source/web/ChromeClientImpl.cpp (revision 156144) --- Source/web/ChromeClientImpl.cpp (revision 157102)
+++ Source/web/ChromeClientImpl.cpp (working copy) +++ Source/web/ChromeClientImpl.cpp (working copy)
@@ -880,7 +880,7 @@ @@ -887,7 +887,7 @@
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(Frame& frame, PopupMenuClient* client) const PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(Frame& frame, PopupMenuClient* client) const
{ {
@ -25,9 +25,9 @@ Index: Source/web/ChromeClientImpl.cpp
return adoptRef(new PopupMenuChromium(frame, client)); return adoptRef(new PopupMenuChromium(frame, client));
Index: Source/web/WebViewImpl.cpp Index: Source/web/WebViewImpl.cpp
=================================================================== ===================================================================
--- Source/web/WebViewImpl.cpp (revision 156144) --- Source/web/WebViewImpl.cpp (revision 157102)
+++ Source/web/WebViewImpl.cpp (working copy) +++ Source/web/WebViewImpl.cpp (working copy)
@@ -393,6 +393,7 @@ @@ -394,6 +394,7 @@
, m_fakePageScaleAnimationPageScaleFactor(0) , m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false) , m_fakePageScaleAnimationUseAnchor(false)
, m_contextMenuAllowed(false) , m_contextMenuAllowed(false)
@ -35,7 +35,7 @@ Index: Source/web/WebViewImpl.cpp
, m_doingDragAndDrop(false) , m_doingDragAndDrop(false)
, m_ignoreInputEvents(false) , m_ignoreInputEvents(false)
, m_suppressNextKeypressEvent(false) , m_suppressNextKeypressEvent(false)
@@ -3636,9 +3637,14 @@ @@ -3671,9 +3672,14 @@
updateLayerTreeViewport(); updateLayerTreeViewport();
} }
@ -50,10 +50,10 @@ Index: Source/web/WebViewImpl.cpp
+ return m_shouldUseExternalPopupMenus; + return m_shouldUseExternalPopupMenus;
} }
void WebViewImpl::setEmulatedTextZoomFactor(float textZoomFactor) void WebViewImpl::startDragging(Frame* frame,
Index: Source/web/WebViewImpl.h Index: Source/web/WebViewImpl.h
=================================================================== ===================================================================
--- Source/web/WebViewImpl.h (revision 156144) --- Source/web/WebViewImpl.h (revision 157102)
+++ Source/web/WebViewImpl.h (working copy) +++ Source/web/WebViewImpl.h (working copy)
@@ -422,7 +422,8 @@ @@ -422,7 +422,8 @@
@ -65,7 +65,7 @@ Index: Source/web/WebViewImpl.h
bool contextMenuAllowed() const bool contextMenuAllowed() const
{ {
@@ -723,6 +724,8 @@ @@ -720,6 +721,8 @@
bool m_contextMenuAllowed; bool m_contextMenuAllowed;

View File

@ -234,7 +234,7 @@ class DownloadTestHandler : public TestHandler {
// Verify the file contents. // Verify the file contents.
std::string contents; std::string contents;
EXPECT_TRUE(file_util::ReadFileToString(test_path_, &contents)); EXPECT_TRUE(base::ReadFileToString(test_path_, &contents));
EXPECT_STREQ(kTestContent, contents.c_str()); EXPECT_STREQ(kTestContent, contents.c_str());
EXPECT_TRUE(temp_dir_.Delete()); EXPECT_TRUE(temp_dir_.Delete());