From 1c6da5fe869a5d36d63925b8f39b6425f35ea5c3 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 20 Apr 2015 14:11:11 +0300 Subject: [PATCH] Update to Chromium revision 59d44948 (#323860) --- CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- cef.gyp | 15 ++ libcef/browser/browser_context_impl.cc | 7 + libcef/browser/browser_context_impl.h | 2 + libcef/browser/browser_context_proxy.cc | 4 + libcef/browser/browser_context_proxy.h | 1 + libcef/browser/browser_host_impl.cc | 14 -- libcef/browser/browser_host_impl.h | 5 - libcef/browser/content_browser_client.cc | 106 ----------- libcef/browser/content_browser_client.h | 12 -- libcef/browser/permission_manager.cc | 161 +++++++++++++++++ libcef/browser/permission_manager.h | 50 ++++++ libcef/browser/render_widget_host_view_osr.cc | 8 +- libcef/common/cef_messages.h | 5 - libcef/renderer/browser_impl.cc | 27 --- libcef/renderer/browser_impl.h | 2 - libcef/renderer/content_renderer_client.cc | 76 -------- libcef/renderer/content_renderer_client.h | 8 - libcef/renderer/render_frame_observer.cc | 76 +++++++- libcef/renderer/render_frame_observer.h | 3 + libcef/renderer/v8_impl.cc | 170 +++++++++--------- libcef/renderer/v8_impl.h | 24 +-- libcef/resources/cef_strings.grd | 5 + patch/patches/browser_web_contents_1257.patch | 10 +- patch/patches/build.patch | 2 +- patch/patches/chrome_browser_1257.patch | 8 +- patch/patches/chrome_pepper_flash_1586.patch | 15 +- patch/patches/compositor_1368.patch | 18 +- patch/patches/content_nav_1129.patch | 8 +- patch/patches/gritsettings.patch | 2 +- patch/patches/gyp_331.patch | 4 +- patch/patches/message_loop_443.patch | 2 +- patch/patches/net_urlrequest_1327.patch | 4 +- patch/patches/prefs_content_1161.patch | 4 +- patch/patches/public_browser_1257.patch | 8 +- patch/patches/render_process_host_1429.patch | 6 +- patch/patches/views_widget_180.patch | 26 +-- patch/patches/webkit_popups.patch | 20 +-- 38 files changed, 491 insertions(+), 429 deletions(-) create mode 100644 libcef/browser/permission_manager.cc create mode 100644 libcef/browser/permission_manager.h diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 4ca9dc1fc..919a269fd 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'fea846358e7c2efe04bdeb4b01ecccee6efe7759', + 'chromium_checkout': '59d4494849b405682265ed5d3f5164573b9a939b', } diff --git a/cef.gyp b/cef.gyp index 02b6967cd..479f543c2 100644 --- a/cef.gyp +++ b/cef.gyp @@ -762,6 +762,7 @@ 'action_name': 'repack_cef_100_percent_pack', 'variables': { 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/components/components_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak', @@ -774,6 +775,7 @@ 'action_name': 'repack_cef_200_percent_pack', 'variables': { 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_200_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/components/components_resources_200_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_200_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_200_percent.pak', @@ -860,6 +862,9 @@ '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '<(DEPTH)/cc/blink/cc_blink.gyp:cc_blink', '<(DEPTH)/cc/cc.gyp:cc', + # Generate chrome/common/safe_browsing/csd.pb.h required by + # zip_analyzer_results.h via chrome_utility_messages.h + '<(DEPTH)/chrome/chrome.gyp:safe_browsing_proto', '<(DEPTH)/components/components.gyp:crash_component_breakpad_mac_to_be_deleted', '<(DEPTH)/components/components.gyp:keyed_service_content', '<(DEPTH)/components/components.gyp:keyed_service_core', @@ -976,6 +981,8 @@ 'libcef/browser/pepper/pepper_flash_browser_host.cc', 'libcef/browser/pepper/pepper_flash_browser_host.h', 'libcef/browser/pepper/device_id_fetcher.cc', + 'libcef/browser/permission_manager.cc', + 'libcef/browser/permission_manager.h', 'libcef/browser/print_settings_impl.cc', 'libcef/browser/print_settings_impl.h', 'libcef/browser/printing/printing_message_filter.cc', @@ -1170,6 +1177,12 @@ '<(DEPTH)/chrome/browser/browser_process.cc', '<(DEPTH)/chrome/browser/browser_process.h', # Include sources for spell checking support. + '<(DEPTH)/chrome/browser/spellchecker/feedback.cc', + '<(DEPTH)/chrome/browser/spellchecker/feedback.h', + '<(DEPTH)/chrome/browser/spellchecker/feedback_sender.cc', + '<(DEPTH)/chrome/browser/spellchecker/feedback_sender.h', + '<(DEPTH)/chrome/browser/spellchecker/misspelling.cc', + '<(DEPTH)/chrome/browser/spellchecker/misspelling.h', '<(DEPTH)/chrome/browser/spellchecker/spellcheck_action.cc', '<(DEPTH)/chrome/browser/spellchecker/spellcheck_action.h', '<(DEPTH)/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc', @@ -1186,6 +1199,8 @@ '<(DEPTH)/chrome/browser/spellchecker/spellcheck_service.h', '<(DEPTH)/chrome/browser/spellchecker/spelling_service_client.cc', '<(DEPTH)/chrome/browser/spellchecker/spelling_service_client.h', + '<(DEPTH)/chrome/browser/spellchecker/word_trimmer.cc', + '<(DEPTH)/chrome/browser/spellchecker/word_trimmer.h', '<(DEPTH)/chrome/common/chrome_constants.cc', '<(DEPTH)/chrome/common/chrome_constants.h', '<(DEPTH)/chrome/common/spellcheck_common.cc', diff --git a/libcef/browser/browser_context_impl.cc b/libcef/browser/browser_context_impl.cc index e7d264412..ea43188e3 100644 --- a/libcef/browser/browser_context_impl.cc +++ b/libcef/browser/browser_context_impl.cc @@ -9,6 +9,7 @@ #include "libcef/browser/content_browser_client.h" #include "libcef/browser/context.h" #include "libcef/browser/download_manager_delegate.h" +#include "libcef/browser/permission_manager.h" #include "libcef/browser/thread_util.h" #include "base/files/file_util.h" @@ -197,6 +198,12 @@ content::SSLHostStateDelegate* return NULL; } +content::PermissionManager* CefBrowserContextImpl::GetPermissionManager() { + if (!permission_manager_.get()) + permission_manager_.reset(new CefPermissionManager()); + return permission_manager_.get(); +} + bool CefBrowserContextImpl::IsProxy() const { return false; } diff --git a/libcef/browser/browser_context_impl.h b/libcef/browser/browser_context_impl.h index 251e19eb6..0c9c77d0a 100644 --- a/libcef/browser/browser_context_impl.h +++ b/libcef/browser/browser_context_impl.h @@ -58,6 +58,7 @@ class CefBrowserContextImpl : public CefBrowserContext { storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; + content::PermissionManager* GetPermissionManager() override; // CefBrowserContext methods. bool IsProxy() const override; @@ -95,6 +96,7 @@ class CefBrowserContextImpl : public CefBrowserContext { scoped_ptr download_manager_delegate_; scoped_refptr url_request_getter_; + scoped_ptr permission_manager_; DISALLOW_COPY_AND_ASSIGN(CefBrowserContextImpl); }; diff --git a/libcef/browser/browser_context_proxy.cc b/libcef/browser/browser_context_proxy.cc index 0c7a970cd..8f6a04800 100644 --- a/libcef/browser/browser_context_proxy.cc +++ b/libcef/browser/browser_context_proxy.cc @@ -95,6 +95,10 @@ content::SSLHostStateDelegate* return parent_->GetSSLHostStateDelegate(); } +content::PermissionManager* CefBrowserContextProxy::GetPermissionManager() { + return parent_->GetPermissionManager(); +} + bool CefBrowserContextProxy::IsProxy() const { return true; } diff --git a/libcef/browser/browser_context_proxy.h b/libcef/browser/browser_context_proxy.h index ea3414c00..1d10328c3 100644 --- a/libcef/browser/browser_context_proxy.h +++ b/libcef/browser/browser_context_proxy.h @@ -49,6 +49,7 @@ class CefBrowserContextProxy : public CefBrowserContext { storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; + content::PermissionManager* GetPermissionManager() override; // CefBrowserContext methods. bool IsProxy() const override; diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index ed8852f74..be594cd8a 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -1620,9 +1620,6 @@ void CefBrowserHostImpl::LoadURL( return; } - // Update the loading URL. - OnLoadingURLChange(gurl); - web_contents_->GetController().LoadURL( gurl, referrer, @@ -1786,11 +1783,6 @@ int CefBrowserHostImpl::browser_id() const { return browser_info_->browser_id(); } -GURL CefBrowserHostImpl::GetLoadingURL() { - base::AutoLock lock_scope(state_lock_); - return loading_url_; -} - void CefBrowserHostImpl::OnSetFocus(cef_focus_source_t source) { if (CEF_CURRENTLY_ON_UIT()) { // SetFocus() might be called while inside the OnSetFocus() callback. If so, @@ -2641,7 +2633,6 @@ bool CefBrowserHostImpl::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(CefBrowserHostImpl, message) IPC_MESSAGE_HANDLER(CefHostMsg_FrameIdentified, OnFrameIdentified) IPC_MESSAGE_HANDLER(CefHostMsg_DidFinishLoad, OnDidFinishLoad) - IPC_MESSAGE_HANDLER(CefHostMsg_LoadingURLChange, OnLoadingURLChange) IPC_MESSAGE_HANDLER(CefHostMsg_Request, OnRequest) IPC_MESSAGE_HANDLER(CefHostMsg_Response, OnResponse) IPC_MESSAGE_HANDLER(CefHostMsg_ResponseAck, OnResponseAck) @@ -2691,11 +2682,6 @@ void CefBrowserHostImpl::OnDidFinishLoad(int64 frame_id, OnLoadEnd(frame, validated_url, http_status_code); } -void CefBrowserHostImpl::OnLoadingURLChange(const GURL& loading_url) { - base::AutoLock lock_scope(state_lock_); - loading_url_ = loading_url; -} - void CefBrowserHostImpl::OnRequest(const Cef_Request_Params& params) { bool success = false; std::string response; diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index fb2b6868f..bd5da2521 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -307,9 +307,6 @@ class CefBrowserHostImpl : public CefBrowserHost, CefWindowX11* window_x11() const { return window_x11_; } #endif - // Returns the URL that is currently loading (or loaded) in the main frame. - GURL GetLoadingURL(); - #if defined(OS_WIN) static void RegisterWindowClass(); #endif @@ -478,7 +475,6 @@ class CefBrowserHostImpl : public CefBrowserHost, const GURL& validated_url, bool is_main_frame, int http_status_code); - void OnLoadingURLChange(const GURL& pending_url); void OnRequest(const Cef_Request_Params& params); void OnResponse(const Cef_Response_Params& params); void OnResponseAck(int request_id); @@ -617,7 +613,6 @@ class CefBrowserHostImpl : public CefBrowserHost, bool can_go_back_; bool can_go_forward_; bool has_document_; - GURL loading_url_; // Messages we queue while waiting for the RenderView to be ready. We queue // them here instead of in the RenderProcessHost to ensure that they're sent diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 149d6e7ac..bd3608f1d 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -37,7 +37,6 @@ #include "content/public/browser/access_token_store.h" #include "content/public/browser/browser_url_handler.h" #include "content/public/browser/child_process_security_policy.h" -#include "content/public/browser/geolocation_provider.h" #include "content/public/browser/plugin_service_filter.h" #include "content/public/browser/quota_permission_context.h" #include "content/public/browser/render_process_host.h" @@ -198,42 +197,6 @@ class CefAllowCertificateErrorCallbackImpl : public CefRequestCallback { DISALLOW_COPY_AND_ASSIGN(CefAllowCertificateErrorCallbackImpl); }; -class CefGeolocationCallbackImpl : public CefGeolocationCallback { - public: - typedef base::Callback CallbackType; - - explicit CefGeolocationCallbackImpl(const CallbackType& callback) - : callback_(callback) {} - - void Continue(bool allow) override { - if (CEF_CURRENTLY_ON_UIT()) { - if (!callback_.is_null()) { - if (allow) { - content::GeolocationProvider::GetInstance()-> - UserDidOptIntoLocationServices(); - } - - callback_.Run(allow ? content::PERMISSION_STATUS_GRANTED : - content::PERMISSION_STATUS_DENIED); - callback_.Reset(); - } - } else { - CEF_POST_TASK(CEF_UIT, - base::Bind(&CefGeolocationCallbackImpl::Continue, this, allow)); - } - } - - void Disconnect() { - callback_.Reset(); - } - - private: - CallbackType callback_; - - IMPLEMENT_REFCOUNTING(CefGeolocationCallbackImpl); - DISALLOW_COPY_AND_ASSIGN(CefGeolocationCallbackImpl); -}; - class CefQuotaPermissionContext : public content::QuotaPermissionContext { public: CefQuotaPermissionContext() { @@ -787,75 +750,6 @@ content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() { browser_main_parts_->browser_context()->request_context().get()); } -void CefContentBrowserClient::RequestPermission( - content::PermissionType permission, - content::WebContents* web_contents, - int bridge_id, - const GURL& requesting_frame, - bool user_gesture, - const base::Callback& result_callback) { - CEF_REQUIRE_UIT(); - - if (permission != content::PermissionType::PERMISSION_GEOLOCATION) { - result_callback.Run(content::PERMISSION_STATUS_DENIED); - return; - } - - bool proceed = false; - - CefRefPtr browser = - CefBrowserHostImpl::GetBrowserForContents(web_contents); - if (browser.get()) { - CefRefPtr client = browser->GetClient(); - if (client.get()) { - CefRefPtr handler = - client->GetGeolocationHandler(); - if (handler.get()) { - CefRefPtr callbackImpl( - new CefGeolocationCallbackImpl(result_callback)); - - // Notify the handler. - proceed = handler->OnRequestGeolocationPermission( - browser.get(), requesting_frame.spec(), bridge_id, - callbackImpl.get()); - if (!proceed) - callbackImpl->Disconnect(); - } - } - } - - if (!proceed) { - // Disallow geolocation access by default. - result_callback.Run(content::PERMISSION_STATUS_DENIED); - } -} - -void CefContentBrowserClient::CancelPermissionRequest( - content::PermissionType permission, - content::WebContents* web_contents, - int bridge_id, - const GURL& requesting_frame) { - CEF_REQUIRE_UIT(); - - if (permission != content::PermissionType::PERMISSION_GEOLOCATION) - return; - - CefRefPtr browser = - CefBrowserHostImpl::GetBrowserForContents(web_contents); - if (browser.get()) { - CefRefPtr client = browser->GetClient(); - if (client.get()) { - CefRefPtr handler = - client->GetGeolocationHandler(); - if (handler.get()) { - handler->OnCancelGeolocationPermission(browser.get(), - requesting_frame.spec(), - bridge_id); - } - } - } -} - bool CefContentBrowserClient::CanCreateWindow( const GURL& opener_url, const GURL& opener_top_level_frame_url, diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index a6323f0cd..ed89d8b1f 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -106,18 +106,6 @@ class CefContentBrowserClient : public content::ContentBrowserClient { const base::Callback& callback, content::CertificateRequestResultType* result) override; content::AccessTokenStore* CreateAccessTokenStore() override; - void RequestPermission( - content::PermissionType permission, - content::WebContents* web_contents, - int bridge_id, - const GURL& requesting_frame, - bool user_gesture, - const base::Callback& result_callback) - override; - void CancelPermissionRequest(content::PermissionType permission, - content::WebContents* web_contents, - int bridge_id, - const GURL& requesting_frame) override; bool CanCreateWindow(const GURL& opener_url, const GURL& opener_top_level_frame_url, const GURL& source_origin, diff --git a/libcef/browser/permission_manager.cc b/libcef/browser/permission_manager.cc new file mode 100644 index 000000000..148ee8b4a --- /dev/null +++ b/libcef/browser/permission_manager.cc @@ -0,0 +1,161 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/permission_manager.h" + +#include "include/cef_client.h" +#include "include/cef_geolocation_handler.h" +#include "libcef/browser/browser_host_impl.h" +#include "libcef/browser/thread_util.h" + +#include "base/callback.h" +#include "content/public/browser/geolocation_provider.h" +#include "content/public/browser/permission_type.h" + +namespace { + +class CefGeolocationCallbackImpl : public CefGeolocationCallback { + public: + typedef base::Callback CallbackType; + + explicit CefGeolocationCallbackImpl(const CallbackType& callback) + : callback_(callback) {} + + void Continue(bool allow) override { + if (CEF_CURRENTLY_ON_UIT()) { + if (!callback_.is_null()) { + if (allow) { + content::GeolocationProvider::GetInstance()-> + UserDidOptIntoLocationServices(); + } + + callback_.Run(allow ? content::PERMISSION_STATUS_GRANTED : + content::PERMISSION_STATUS_DENIED); + callback_.Reset(); + } + } else { + CEF_POST_TASK(CEF_UIT, + base::Bind(&CefGeolocationCallbackImpl::Continue, this, allow)); + } + } + + void Disconnect() { + callback_.Reset(); + } + + private: + CallbackType callback_; + + IMPLEMENT_REFCOUNTING(CefGeolocationCallbackImpl); + DISALLOW_COPY_AND_ASSIGN(CefGeolocationCallbackImpl); +}; + +} // namespace + +CefPermissionManager::CefPermissionManager() + : PermissionManager() { +} + +CefPermissionManager::~CefPermissionManager() { +} + +void CefPermissionManager::RequestPermission( + content::PermissionType permission, + content::WebContents* web_contents, + int request_id, + const GURL& requesting_origin, + bool user_gesture, + const base::Callback& callback) { + CEF_REQUIRE_UIT(); + + if (permission != content::PermissionType::GEOLOCATION) { + callback.Run(content::PERMISSION_STATUS_DENIED); + return; + } + + bool proceed = false; + + CefRefPtr browser = + CefBrowserHostImpl::GetBrowserForContents(web_contents); + if (browser.get()) { + CefRefPtr client = browser->GetClient(); + if (client.get()) { + CefRefPtr handler = + client->GetGeolocationHandler(); + if (handler.get()) { + CefRefPtr callbackImpl( + new CefGeolocationCallbackImpl(callback)); + + // Notify the handler. + proceed = handler->OnRequestGeolocationPermission( + browser.get(), requesting_origin.spec(), request_id, + callbackImpl.get()); + if (!proceed) + callbackImpl->Disconnect(); + } + } + } + + if (!proceed) { + // Disallow geolocation access by default. + callback.Run(content::PERMISSION_STATUS_DENIED); + } +} + +void CefPermissionManager::CancelPermissionRequest( + content::PermissionType permission, + content::WebContents* web_contents, + int request_id, + const GURL& requesting_origin) { + CEF_REQUIRE_UIT(); + + if (permission != content::PermissionType::GEOLOCATION) + return; + + CefRefPtr browser = + CefBrowserHostImpl::GetBrowserForContents(web_contents); + if (browser.get()) { + CefRefPtr client = browser->GetClient(); + if (client.get()) { + CefRefPtr handler = + client->GetGeolocationHandler(); + if (handler.get()) { + handler->OnCancelGeolocationPermission(browser.get(), + requesting_origin.spec(), + request_id); + } + } + } +} + +void CefPermissionManager::ResetPermission( + content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) { +} + +content::PermissionStatus CefPermissionManager::GetPermissionStatus( + content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) { + return content::PERMISSION_STATUS_DENIED; +} + +void CefPermissionManager::RegisterPermissionUsage( + content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) { +} + +int CefPermissionManager::SubscribePermissionStatusChange( + content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, + const base::Callback& callback) { + return -1; +} + +void CefPermissionManager::UnsubscribePermissionStatusChange( + int subscription_id) { +} diff --git a/libcef/browser/permission_manager.h b/libcef/browser/permission_manager.h new file mode 100644 index 000000000..ec7817611 --- /dev/null +++ b/libcef/browser/permission_manager.h @@ -0,0 +1,50 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_PERMISSION_MANAGER_H_ +#define CEF_LIBCEF_BROWSER_PERMISSION_MANAGER_H_ + +#include "base/callback_forward.h" +#include "base/macros.h" +#include "content/public/browser/permission_manager.h" + +class CefPermissionManager : public content::PermissionManager { + public: + CefPermissionManager(); + ~CefPermissionManager() override; + + // PermissionManager implementation. + void RequestPermission( + content::PermissionType permission, + content::WebContents* web_contents, + int request_id, + const GURL& requesting_origin, + bool user_gesture, + const base::Callback& callback) override; + void CancelPermissionRequest(content::PermissionType permission, + content::WebContents* web_contents, + int request_id, + const GURL& requesting_origin) override; + void ResetPermission(content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) override; + content::PermissionStatus GetPermissionStatus( + content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) override; + void RegisterPermissionUsage(content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) override; + int SubscribePermissionStatusChange( + content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, + const base::Callback& callback) override; + void UnsubscribePermissionStatusChange(int subscription_id) override; + + private: + DISALLOW_COPY_AND_ASSIGN(CefPermissionManager); +}; + +#endif // CEF_LIBCEF_BROWSER_PERMISSION_MANAGER_H_ diff --git a/libcef/browser/render_widget_host_view_osr.cc b/libcef/browser/render_widget_host_view_osr.cc index 7ed16e461..65cd437cd 100644 --- a/libcef/browser/render_widget_host_view_osr.cc +++ b/libcef/browser/render_widget_host_view_osr.cc @@ -12,6 +12,7 @@ #include "base/command_line.h" #include "cc/output/copy_output_request.h" #include "cc/scheduler/delay_based_time_source.h" +#include "content/browser/bad_message.h" #include "content/browser/compositor/image_transport_factory.h" #include "content/browser/compositor/resize_lock.h" #include "content/browser/renderer_host/dip_util.h" @@ -651,8 +652,11 @@ void CefRenderWidgetHostViewOSR::OnSwapCompositorFrame( if (frame->software_frame_data) { DLOG(ERROR) << "Unable to use software frame in CEF windowless rendering"; - if (render_widget_host_) - render_widget_host_->GetProcess()->ReceivedBadMessage(); + if (render_widget_host_) { + content::bad_message::ReceivedBadMessage( + render_widget_host_->GetProcess(), + content::bad_message::RWHVM_UNEXPECTED_FRAME_TYPE); + } return; } } diff --git a/libcef/common/cef_messages.h b/libcef/common/cef_messages.h index 3517d190a..2e6588327 100644 --- a/libcef/common/cef_messages.h +++ b/libcef/common/cef_messages.h @@ -175,11 +175,6 @@ IPC_MESSAGE_ROUTED4(CefHostMsg_DidFinishLoad, bool /* is_main_frame */, int /* http_status_code */) -// Sent when a new URL is about to be loaded in the main frame. Used for the -// cookie manager. -IPC_MESSAGE_ROUTED1(CefHostMsg_LoadingURLChange, - GURL /* loading_url */) - // Sent when the renderer has a request for the browser. The browser may respond // with a CefMsg_Response. IPC_MESSAGE_ROUTED1(CefHostMsg_Request, diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index c4fd738f8..698c541f5 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -307,9 +307,6 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) { blink::WebURLRequest request(params.url); - // DidCreateDataSource checks for this value. - request.setRequestorID(-1); - if (!params.method.empty()) request.setHTTPMethod(base::ASCIIToUTF16(params.method)); @@ -574,30 +571,6 @@ void CefBrowserImpl::FocusedNodeChanged(const blink::WebNode& node) { } } -void CefBrowserImpl::DidCreateDataSource(blink::WebLocalFrame* frame, - blink::WebDataSource* ds) { - const blink::WebURLRequest& request = ds->request(); - if (request.requestorID() == -1) { - // Mark the request as browser-initiated so - // RenderViewImpl::decidePolicyForNavigation won't attempt to fork it. - content::DocumentState* document_state = - content::DocumentState::FromDataSource(ds); - document_state->set_navigation_state( - content::NavigationStateImpl::CreateBrowserInitiated( - content::CommonNavigationParams(), - content::StartNavigationParams(), - content::HistoryNavigationParams())); - } - - if (frame->parent() == 0) { - GURL url = ds->request().url(); - if (!url.is_empty()) { - // Notify that the loading URL has changed. - Send(new CefHostMsg_LoadingURLChange(routing_id(), url)); - } - } -} - bool CefBrowserImpl::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(CefBrowserImpl, message) diff --git a/libcef/renderer/browser_impl.h b/libcef/renderer/browser_impl.h index ee9060035..7c991f807 100644 --- a/libcef/renderer/browser_impl.h +++ b/libcef/renderer/browser_impl.h @@ -119,8 +119,6 @@ class CefBrowserImpl : public CefBrowser, bool is_new_navigation) override; void FrameDetached(blink::WebFrame* frame) override; void FocusedNodeChanged(const blink::WebNode& node) override; - void DidCreateDataSource(blink::WebLocalFrame* frame, - blink::WebDataSource* ds) override; bool OnMessageReceived(const IPC::Message& message) override; // RenderViewObserver::OnMessageReceived message handlers. diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index 8e283756f..b249e725c 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -3,17 +3,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/compiler_specific.h" - -#include "config.h" -MSVC_PUSH_WARNING_LEVEL(0); -#include "bindings/core/v8/V8Binding.h" -#include "bindings/core/v8/V8RecursionScope.h" -MSVC_POP_WARNING(); -#undef ceil -#undef FROM_HERE -#undef LOG - #include "libcef/renderer/content_renderer_client.h" #include "libcef/browser/context.h" @@ -61,13 +50,11 @@ MSVC_POP_WARNING(); #include "third_party/WebKit/public/web/WebElement.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" -#include "third_party/WebKit/public/web/WebKit.h" #include "third_party/WebKit/public/web/WebPluginParams.h" #include "third_party/WebKit/public/web/WebPrerendererClient.h" #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" #include "third_party/WebKit/public/web/WebSecurityPolicy.h" #include "third_party/WebKit/public/web/WebView.h" -#include "v8/include/v8.h" #if defined(OS_MACOSX) #include "base/mac/mac_util.h" @@ -625,69 +612,6 @@ bool CefContentRendererClient::HandleNavigation( return false; } -void CefContentRendererClient::DidCreateScriptContext( - blink::WebLocalFrame* frame, - v8::Handle context, - int extension_group, - int world_id) { - CefRefPtr browserPtr = - CefBrowserImpl::GetBrowserForMainFrame(frame->top()); - DCHECK(browserPtr.get()); - if (!browserPtr.get()) - return; - - CefRefPtr framePtr = browserPtr->GetWebFrameImpl(frame); - - v8::Isolate* isolate = blink::mainThreadIsolate(); - v8::HandleScope handle_scope(isolate); - v8::Context::Scope scope(context); - blink::V8RecursionScope recursion_scope(isolate); - - CefRefPtr contextPtr(new CefV8ContextImpl(isolate, context)); - - // Notify the render process handler. - CefRefPtr application = CefContentClient::Get()->application(); - if (application.get()) { - CefRefPtr handler = - application->GetRenderProcessHandler(); - if (handler.get()) - handler->OnContextCreated(browserPtr.get(), framePtr.get(), contextPtr); - } -} - -void CefContentRendererClient::WillReleaseScriptContext( - blink::WebLocalFrame* frame, - v8::Handle context, - int world_id) { - // Notify the render process handler. - CefRefPtr application = CefContentClient::Get()->application(); - if (application.get()) { - CefRefPtr handler = - application->GetRenderProcessHandler(); - if (handler.get()) { - CefRefPtr browserPtr = - CefBrowserImpl::GetBrowserForMainFrame(frame->top()); - DCHECK(browserPtr.get()); - if (browserPtr.get()) { - CefRefPtr framePtr = browserPtr->GetWebFrameImpl(frame); - - v8::Isolate* isolate = blink::mainThreadIsolate(); - v8::HandleScope handle_scope(isolate); - v8::Context::Scope scope(context); - blink::V8RecursionScope recursion_scope(isolate); - - CefRefPtr contextPtr( - new CefV8ContextImpl(isolate, context)); - - handler->OnContextReleased(browserPtr.get(), framePtr.get(), - contextPtr); - } - } - } - - CefV8ReleaseContext(context); -} - void CefContentRendererClient::WillDestroyCurrentMessageLoop() { base::AutoLock lock_scope(single_process_cleanup_lock_); single_process_cleanup_complete_ = true; diff --git a/libcef/renderer/content_renderer_client.h b/libcef/renderer/content_renderer_client.h index 316cdfb59..fc4c1d96a 100644 --- a/libcef/renderer/content_renderer_client.h +++ b/libcef/renderer/content_renderer_client.h @@ -94,14 +94,6 @@ class CefContentRendererClient : public content::ContentRendererClient, blink::WebNavigationType type, blink::WebNavigationPolicy default_policy, bool is_redirect) override; - void DidCreateScriptContext(blink::WebLocalFrame* frame, - v8::Handle context, - int extension_group, - int world_id) override; - - void WillReleaseScriptContext(blink::WebLocalFrame* frame, - v8::Handle context, - int world_id); // MessageLoop::DestructionObserver implementation. void WillDestroyCurrentMessageLoop() override; diff --git a/libcef/renderer/render_frame_observer.cc b/libcef/renderer/render_frame_observer.cc index d76462ed1..dc4b7a513 100644 --- a/libcef/renderer/render_frame_observer.cc +++ b/libcef/renderer/render_frame_observer.cc @@ -2,11 +2,25 @@ // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file. + +#include "base/compiler_specific.h" + +#include "config.h" +MSVC_PUSH_WARNING_LEVEL(0); +#include "bindings/core/v8/V8RecursionScope.h" +MSVC_POP_WARNING(); +#undef FROM_HERE +#undef LOG + #include "libcef/renderer/render_frame_observer.h" +#include "libcef/common/content_client.h" #include "libcef/renderer/content_renderer_client.h" +#include "libcef/renderer/v8_impl.h" #include "content/public/renderer/render_frame.h" +#include "third_party/WebKit/public/web/WebLocalFrame.h" +#include "third_party/WebKit/public/web/WebKit.h" CefRenderFrameObserver::CefRenderFrameObserver( content::RenderFrame* render_frame) @@ -16,9 +30,67 @@ CefRenderFrameObserver::CefRenderFrameObserver( CefRenderFrameObserver::~CefRenderFrameObserver() { } +void CefRenderFrameObserver::DidCreateScriptContext( + v8::Handle context, + int extension_group, + int world_id) { + blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); + + CefRefPtr browserPtr = + CefBrowserImpl::GetBrowserForMainFrame(frame->top()); + DCHECK(browserPtr.get()); + if (!browserPtr.get()) + return; + + CefRefPtr framePtr = browserPtr->GetWebFrameImpl(frame); + + v8::Isolate* isolate = blink::mainThreadIsolate(); + v8::HandleScope handle_scope(isolate); + v8::Context::Scope scope(context); + blink::V8RecursionScope recursion_scope(isolate); + + CefRefPtr contextPtr(new CefV8ContextImpl(isolate, context)); + + // Notify the render process handler. + CefRefPtr application = CefContentClient::Get()->application(); + if (application.get()) { + CefRefPtr handler = + application->GetRenderProcessHandler(); + if (handler.get()) + handler->OnContextCreated(browserPtr.get(), framePtr.get(), contextPtr); + } +} + void CefRenderFrameObserver::WillReleaseScriptContext( v8::Handle context, int world_id) { - CefContentRendererClient::Get()->WillReleaseScriptContext( - render_frame()->GetWebFrame(), context, world_id); + blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); + + // Notify the render process handler. + CefRefPtr application = CefContentClient::Get()->application(); + if (application.get()) { + CefRefPtr handler = + application->GetRenderProcessHandler(); + if (handler.get()) { + CefRefPtr browserPtr = + CefBrowserImpl::GetBrowserForMainFrame(frame->top()); + DCHECK(browserPtr.get()); + if (browserPtr.get()) { + CefRefPtr framePtr = browserPtr->GetWebFrameImpl(frame); + + v8::Isolate* isolate = blink::mainThreadIsolate(); + v8::HandleScope handle_scope(isolate); + v8::Context::Scope scope(context); + blink::V8RecursionScope recursion_scope(isolate); + + CefRefPtr contextPtr( + new CefV8ContextImpl(isolate, context)); + + handler->OnContextReleased(browserPtr.get(), framePtr.get(), + contextPtr); + } + } + } + + CefV8ReleaseContext(context); } diff --git a/libcef/renderer/render_frame_observer.h b/libcef/renderer/render_frame_observer.h index cb8cdc32c..5fd671413 100644 --- a/libcef/renderer/render_frame_observer.h +++ b/libcef/renderer/render_frame_observer.h @@ -16,6 +16,9 @@ class CefRenderFrameObserver : public content::RenderFrameObserver { explicit CefRenderFrameObserver(content::RenderFrame* render_frame); ~CefRenderFrameObserver() override; + void DidCreateScriptContext(v8::Handle context, + int extension_group, + int world_id) override; void WillReleaseScriptContext(v8::Handle context, int world_id) override; diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index ae8d89219..d5c1a6241 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -83,7 +83,7 @@ class CefV8IsolateManager { } scoped_refptr GetContextState( - v8::Handle context) { + v8::Local context) { DCHECK_EQ(isolate_, v8::Isolate::GetCurrent()); DCHECK(context.IsEmpty() || isolate_ == context->GetIsolate()); @@ -108,11 +108,11 @@ class CefV8IsolateManager { return state; } else { - v8::Handle key = + v8::Local key = v8::String::NewFromUtf8(isolate_, kCefContextState); - v8::Handle object = context->Global(); - v8::Handle value = object->GetHiddenValue(key); + v8::Local object = context->Global(); + v8::Local value = object->GetHiddenValue(key); if (!value.IsEmpty()) { return static_cast( v8::External::Cast(*value)->Value()); @@ -128,7 +128,7 @@ class CefV8IsolateManager { } } - void ReleaseContext(v8::Handle context) { + void ReleaseContext(v8::Local context) { DCHECK_EQ(isolate_, v8::Isolate::GetCurrent()); DCHECK_EQ(isolate_, context->GetIsolate()); @@ -143,10 +143,10 @@ class CefV8IsolateManager { context_map_.erase(it); } } else { - v8::Handle key = + v8::Local key = v8::String::NewFromUtf8(isolate_, kCefContextState); - v8::Handle object = context->Global(); - v8::Handle value = object->GetHiddenValue(key); + v8::Local object = context->Global(); + v8::Local value = object->GetHiddenValue(key); if (value.IsEmpty()) return; @@ -323,14 +323,14 @@ class V8TrackObject : public CefTrackNode { } // Attach this track object to the specified V8 object. - void AttachTo(v8::Handle object) { + void AttachTo(v8::Local object) { object->SetHiddenValue(v8::String::NewFromUtf8(isolate_, kCefTrackObject), v8::External::New(isolate_, this)); } // Retrieve the track object for the specified V8 object. static V8TrackObject* Unwrap(v8::Isolate* isolate, - v8::Handle object) { + v8::Local object) { DCHECK(isolate); v8::Local value = object->GetHiddenValue( @@ -360,7 +360,7 @@ class V8TrackString : public CefTrackNode { // Convert a CefString to a V8::String. -v8::Handle GetV8String(v8::Isolate* isolate, +v8::Local GetV8String(v8::Isolate* isolate, const CefString& str) { #if defined(CEF_STRING_TYPE_UTF16) // Already a UTF16 string. @@ -397,7 +397,7 @@ void v8impl_string_dtor(char* str) { #endif // Convert a v8::String to CefString. -void GetCefString(v8::Handle str, CefString& out) { +void GetCefString(v8::Local str, CefString& out) { if (str.IsEmpty()) return; @@ -481,7 +481,7 @@ void AccessorGetterCallbackImpl( const v8::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); - v8::Handle obj = info.This(); + v8::Local obj = info.This(); CefRefPtr accessorPtr; @@ -519,7 +519,7 @@ void AccessorSetterCallbackImpl( const v8::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); - v8::Handle obj = info.This(); + v8::Local obj = info.This(); CefRefPtr accessorPtr; @@ -541,11 +541,11 @@ void AccessorSetterCallbackImpl( } } -v8::Local CallV8Function(v8::Handle context, - v8::Handle function, - v8::Handle receiver, +v8::Local CallV8Function(v8::Local context, + v8::Local function, + v8::Local receiver, int argc, - v8::Handle args[], + v8::Local args[], v8::Isolate* isolate) { v8::Local func_rv; @@ -583,7 +583,7 @@ class ExtensionWrapper : public v8::Extension { v8::Isolate* isolate, v8::Handle name) override { if (!handler_) - return v8::Handle(); + return v8::Local(); return v8::FunctionTemplate::New(isolate, FunctionCallbackImpl, @@ -596,7 +596,7 @@ class ExtensionWrapper : public v8::Extension { class CefV8ExceptionImpl : public CefV8Exception { public: - explicit CefV8ExceptionImpl(v8::Handle message) + explicit CefV8ExceptionImpl(v8::Local message) : line_number_(0), start_position_(0), end_position_(0), @@ -653,7 +653,7 @@ void MessageListenerCallbackImpl(v8::Handle message, v8::Isolate* isolate = GetIsolateManager()->isolate(); CefRefPtr context = CefV8Context::GetCurrentContext(); - v8::Handle v8Stack = message->GetStackTrace(); + v8::Local v8Stack = message->GetStackTrace(); DCHECK(!v8Stack.IsEmpty()); CefRefPtr stackTrace = new CefV8StackTraceImpl(isolate, v8Stack); @@ -679,7 +679,7 @@ void CefV8IsolateDestroyed() { g_v8_state.Pointer()->DestroyIsolateManager(); } -void CefV8ReleaseContext(v8::Handle context) { +void CefV8ReleaseContext(v8::Local context) { GetIsolateManager()->ReleaseContext(context); } @@ -771,7 +771,7 @@ bool CefV8HandleBase::BelongsToCurrentThread() const { } CefV8HandleBase::CefV8HandleBase(v8::Isolate* isolate, - v8::Handle context) + v8::Local context) : isolate_(isolate) { DCHECK(isolate_); @@ -821,7 +821,7 @@ bool CefV8Context::InContext() { // CefV8ContextImpl CefV8ContextImpl::CefV8ContextImpl(v8::Isolate* isolate, - v8::Handle context) + v8::Local context) : handle_(new Handle(isolate, context, context)) #ifndef NDEBUG , enter_count_(0) @@ -879,7 +879,7 @@ CefRefPtr CefV8ContextImpl::GetGlobal() { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle context = GetV8Context(); + v8::Local context = GetV8Context(); v8::Context::Scope context_scope(context); return new CefV8ValueImpl(isolate, context->Global()); } @@ -946,7 +946,7 @@ bool CefV8ContextImpl::Eval(const CefString& code, return false; v8::Local func = v8::Local::Cast(val); - v8::Handle code_val = GetV8String(isolate, code); + v8::Local code_val = GetV8String(isolate, code); v8::TryCatch try_catch; try_catch.SetVerbose(true); @@ -966,7 +966,7 @@ bool CefV8ContextImpl::Eval(const CefString& code, return true; } -v8::Handle CefV8ContextImpl::GetV8Context() { +v8::Local CefV8ContextImpl::GetV8Context() { return handle_->GetNewV8Handle(); } @@ -981,7 +981,7 @@ blink::WebFrame* CefV8ContextImpl::GetWebFrame() { // CefV8ValueImpl::Handle CefV8ValueImpl::Handle::Handle(v8::Isolate* isolate, - v8::Handle context, + v8::Local context, handleType v, CefTrackNode* tracker) : CefV8HandleBase(isolate, context), @@ -1271,7 +1271,7 @@ CefV8ValueImpl::CefV8ValueImpl(v8::Isolate* isolate) } CefV8ValueImpl::CefV8ValueImpl(v8::Isolate* isolate, - v8::Handle value) + v8::Local value) : isolate_(isolate), type_(TYPE_INVALID), rethrow_exceptions_(false) { @@ -1286,7 +1286,7 @@ CefV8ValueImpl::~CefV8ValueImpl() { handle_->SetWeakIfNecessary(); } -void CefV8ValueImpl::InitFromV8Value(v8::Handle value) { +void CefV8ValueImpl::InitFromV8Value(v8::Local value) { if (value->IsUndefined()) { InitUndefined(); } else if (value->IsNull()) { @@ -1371,13 +1371,13 @@ void CefV8ValueImpl::InitString(CefString& value) { } } -void CefV8ValueImpl::InitObject(v8::Handle value, CefTrackNode* tracker) { +void CefV8ValueImpl::InitObject(v8::Local value, CefTrackNode* tracker) { DCHECK_EQ(type_, TYPE_INVALID); type_ = TYPE_OBJECT; - handle_ = new Handle(isolate_, v8::Handle(), value, tracker); + handle_ = new Handle(isolate_, v8::Local(), value, tracker); } -v8::Handle CefV8ValueImpl::GetV8Value(bool should_persist) { +v8::Local CefV8ValueImpl::GetV8Value(bool should_persist) { switch (type_) { case TYPE_UNDEFINED: return v8::Undefined(isolate_); @@ -1403,7 +1403,7 @@ v8::Handle CefV8ValueImpl::GetV8Value(bool should_persist) { } NOTREACHED() << "Invalid type for CefV8ValueImpl"; - return v8::Handle(); + return v8::Local(); } bool CefV8ValueImpl::IsValid() { @@ -1568,8 +1568,8 @@ bool CefV8ValueImpl::IsUserCreated() { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj); return (tracker != NULL); @@ -1612,8 +1612,8 @@ bool CefV8ValueImpl::HasValue(const CefString& key) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); return obj->Has(GetV8String(isolate, key)); } @@ -1626,8 +1626,8 @@ bool CefV8ValueImpl::HasValue(int index) { } v8::HandleScope handle_scope(handle_->isolate()); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); return obj->Has(index); } @@ -1636,8 +1636,8 @@ bool CefV8ValueImpl::DeleteValue(const CefString& key) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); v8::TryCatch try_catch; try_catch.SetVerbose(true); @@ -1654,8 +1654,8 @@ bool CefV8ValueImpl::DeleteValue(int index) { } v8::HandleScope handle_scope(handle_->isolate()); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); v8::TryCatch try_catch; try_catch.SetVerbose(true); @@ -1668,8 +1668,8 @@ CefRefPtr CefV8ValueImpl::GetValue(const CefString& key) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); v8::TryCatch try_catch; try_catch.SetVerbose(true); @@ -1689,8 +1689,8 @@ CefRefPtr CefV8ValueImpl::GetValue(int index) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); v8::TryCatch try_catch; try_catch.SetVerbose(true); @@ -1709,8 +1709,8 @@ bool CefV8ValueImpl::SetValue(const CefString& key, if (impl && impl->IsValid()) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); v8::TryCatch try_catch; try_catch.SetVerbose(true); @@ -1743,8 +1743,8 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr value) { CefV8ValueImpl* impl = static_cast(value.get()); if (impl && impl->IsValid()) { v8::HandleScope handle_scope(handle_->isolate()); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); v8::TryCatch try_catch; try_catch.SetVerbose(true); @@ -1762,8 +1762,8 @@ bool CefV8ValueImpl::SetValue(const CefString& key, AccessControl settings, v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); CefRefPtr accessorPtr; @@ -1793,8 +1793,8 @@ bool CefV8ValueImpl::GetKeys(std::vector& keys) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); v8::Local arr_keys = obj->GetPropertyNames(); uint32_t len = arr_keys->Length(); @@ -1812,8 +1812,8 @@ bool CefV8ValueImpl::SetUserData(CefRefPtr user_data) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj); if (tracker) { @@ -1829,8 +1829,8 @@ CefRefPtr CefV8ValueImpl::GetUserData() { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj); if (tracker) @@ -1844,8 +1844,8 @@ int CefV8ValueImpl::GetExternallyAllocatedMemory() { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj); if (tracker) @@ -1859,8 +1859,8 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); - v8::Handle obj = value->ToObject(); + v8::Local value = handle_->GetNewV8Handle(false); + v8::Local obj = value->ToObject(); V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj); if (tracker) @@ -1873,14 +1873,14 @@ int CefV8ValueImpl::GetArrayLength() { CEF_V8_REQUIRE_OBJECT_RETURN(0); v8::HandleScope handle_scope(handle_->isolate()); - v8::Handle value = handle_->GetNewV8Handle(false); + v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsArray()) { NOTREACHED() << "V8 value is not an array"; return 0; } - v8::Handle obj = value->ToObject(); - v8::Local arr = v8::Handle::Cast(obj); + v8::Local obj = value->ToObject(); + v8::Local arr = v8::Local::Cast(obj); return arr->Length(); } @@ -1889,14 +1889,14 @@ CefString CefV8ValueImpl::GetFunctionName() { CEF_V8_REQUIRE_OBJECT_RETURN(rv); v8::HandleScope handle_scope(handle_->isolate()); - v8::Handle value = handle_->GetNewV8Handle(false); + v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsFunction()) { NOTREACHED() << "V8 value is not a function"; return rv; } - v8::Handle obj = value->ToObject(); - v8::Handle func = v8::Handle::Cast(obj); + v8::Local obj = value->ToObject(); + v8::Local func = v8::Local::Cast(obj); GetCefString(v8::Handle::Cast(func->GetName()), rv); return rv; } @@ -1906,13 +1906,13 @@ CefRefPtr CefV8ValueImpl::GetFunctionHandler() { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); + v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsFunction()) { NOTREACHED() << "V8 value is not a function"; return 0; } - v8::Handle obj = value->ToObject(); + v8::Local obj = value->ToObject(); V8TrackObject* tracker = V8TrackObject::Unwrap(isolate, obj); if (tracker) return tracker->GetHandler(); @@ -1936,7 +1936,7 @@ CefRefPtr CefV8ValueImpl::ExecuteFunctionWithContext( v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle value = handle_->GetNewV8Handle(false); + v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsFunction()) { NOTREACHED() << "V8 value is not a function"; return 0; @@ -1972,21 +1972,21 @@ CefRefPtr CefV8ValueImpl::ExecuteFunctionWithContext( v8::Context::Scope context_scope(context_local); - v8::Handle obj = value->ToObject(); - v8::Handle func = v8::Handle::Cast(obj); - v8::Handle recv; + v8::Local obj = value->ToObject(); + v8::Local func = v8::Local::Cast(obj); + v8::Local recv; // Default to the global object if no object was provided. if (object.get()) { CefV8ValueImpl* recv_impl = static_cast(object.get()); - recv = v8::Handle::Cast(recv_impl->GetV8Value(true)); + recv = v8::Local::Cast(recv_impl->GetV8Value(true)); } else { recv = context_local->Global(); } - v8::Handle *argv = NULL; + v8::Local *argv = NULL; if (argc > 0) { - argv = new v8::Handle[argc]; + argv = new v8::Local[argc]; for (int i = 0; i < argc; ++i) { argv[i] = static_cast(arguments[i].get())->GetV8Value(true); @@ -2035,7 +2035,7 @@ CefRefPtr CefV8StackTrace::GetCurrent(int frame_limit) { v8::Isolate* isolate = GetIsolateManager()->isolate(); v8::HandleScope handle_scope(isolate); - v8::Handle stackTrace = + v8::Local stackTrace = v8::StackTrace::CurrentStackTrace( isolate, frame_limit, v8::StackTrace::kDetailed); if (stackTrace.IsEmpty()) @@ -2048,7 +2048,7 @@ CefRefPtr CefV8StackTrace::GetCurrent(int frame_limit) { CefV8StackTraceImpl::CefV8StackTraceImpl( v8::Isolate* isolate, - v8::Handle handle) { + v8::Local handle) { int frame_count = handle->GetFrameCount(); if (frame_count > 0) { frames_.reserve(frame_count); @@ -2079,19 +2079,19 @@ CefRefPtr CefV8StackTraceImpl::GetFrame(int index) { CefV8StackFrameImpl::CefV8StackFrameImpl( v8::Isolate* isolate, - v8::Handle handle) + v8::Local handle) : line_number_(0), column_(0), is_eval_(false), is_constructor_(false) { if (handle.IsEmpty()) return; - GetCefString(v8::Handle::Cast(handle->GetScriptName()), + GetCefString(v8::Local::Cast(handle->GetScriptName()), script_name_); GetCefString( - v8::Handle::Cast(handle->GetScriptNameOrSourceURL()), + v8::Local::Cast(handle->GetScriptNameOrSourceURL()), script_name_or_source_url_); - GetCefString(v8::Handle::Cast(handle->GetFunctionName()), + GetCefString(v8::Local::Cast(handle->GetFunctionName()), function_name_); line_number_ = handle->GetLineNumber(); column_ = handle->GetColumn(); diff --git a/libcef/renderer/v8_impl.h b/libcef/renderer/v8_impl.h index 4d3f40f1c..e773cbb20 100644 --- a/libcef/renderer/v8_impl.h +++ b/libcef/renderer/v8_impl.h @@ -31,7 +31,7 @@ void CefV8IsolateCreated(); void CefV8IsolateDestroyed(); // Call to detach all handles associated with the specified context. -void CefV8ReleaseContext(v8::Handle context); +void CefV8ReleaseContext(v8::Local context); // Set the stack size for uncaught exceptions. void CefV8SetUncaughtExceptionStackSize(int stack_size); @@ -117,7 +117,7 @@ class CefV8HandleBase : // |context| is the context that owns this handle. If empty the current // context will be used. CefV8HandleBase(v8::Isolate* isolate, - v8::Handle context); + v8::Local context); virtual ~CefV8HandleBase(); protected: @@ -135,7 +135,7 @@ class CefV8Handle : public CefV8HandleBase { typedef v8::Persistent persistentType; CefV8Handle(v8::Isolate* isolate, - v8::Handle context, + v8::Local context, handleType v) : CefV8HandleBase(isolate, context), handle_(isolate, v) { @@ -170,7 +170,7 @@ class CefV8Handle { class CefV8ContextImpl : public CefV8Context { public: CefV8ContextImpl(v8::Isolate* isolate, - v8::Handle context); + v8::Local context); ~CefV8ContextImpl() override; CefRefPtr GetTaskRunner() override; @@ -185,7 +185,7 @@ class CefV8ContextImpl : public CefV8Context { CefRefPtr& retval, CefRefPtr& exception) override; - v8::Handle GetV8Context(); + v8::Local GetV8Context(); blink::WebFrame* GetWebFrame(); protected: @@ -205,12 +205,12 @@ class CefV8ValueImpl : public CefV8Value { public: explicit CefV8ValueImpl(v8::Isolate* isolate); CefV8ValueImpl(v8::Isolate* isolate, - v8::Handle value); + v8::Local value); ~CefV8ValueImpl() override; // Used for initializing the CefV8ValueImpl. Should be called a single time // after the CefV8ValueImpl is created. - void InitFromV8Value(v8::Handle value); + void InitFromV8Value(v8::Local value); void InitUndefined(); void InitNull(); void InitBool(bool value); @@ -219,11 +219,11 @@ class CefV8ValueImpl : public CefV8Value { void InitDouble(double value); void InitDate(const CefTime& value); void InitString(CefString& value); - void InitObject(v8::Handle value, CefTrackNode* tracker); + void InitObject(v8::Local value, CefTrackNode* tracker); // Creates a new V8 value for the underlying value or returns the existing // object handle. - v8::Handle GetV8Value(bool should_persist); + v8::Local GetV8Value(bool should_persist); bool IsValid() override; bool IsUndefined() override; @@ -287,7 +287,7 @@ class CefV8ValueImpl : public CefV8Value { typedef v8::Persistent persistentType; Handle(v8::Isolate* isolate, - v8::Handle context, + v8::Local context, handleType v, CefTrackNode* tracker); @@ -356,7 +356,7 @@ class CefV8ValueImpl : public CefV8Value { class CefV8StackTraceImpl : public CefV8StackTrace { public: CefV8StackTraceImpl(v8::Isolate* isolate, - v8::Handle handle); + v8::Local handle); ~CefV8StackTraceImpl() override; bool IsValid() override; @@ -373,7 +373,7 @@ class CefV8StackTraceImpl : public CefV8StackTrace { class CefV8StackFrameImpl : public CefV8StackFrame { public: CefV8StackFrameImpl(v8::Isolate* isolate, - v8::Handle handle); + v8::Local handle); ~CefV8StackFrameImpl() override; bool IsValid() override; diff --git a/libcef/resources/cef_strings.grd b/libcef/resources/cef_strings.grd index e2924227c..dc68c80bd 100644 --- a/libcef/resources/cef_strings.grd +++ b/libcef/resources/cef_strings.grd @@ -328,6 +328,11 @@ need to be translated for each locale.--> The selected printer is not available or not installed correctly. Check your printer or try selecting another printer. + + + V8 Proxy Resolver + + diff --git a/patch/patches/browser_web_contents_1257.patch b/patch/patches/browser_web_contents_1257.patch index 536f17c6d..92053b4bc 100644 --- a/patch/patches/browser_web_contents_1257.patch +++ b/patch/patches/browser_web_contents_1257.patch @@ -1,8 +1,8 @@ diff --git web_contents_impl.cc web_contents_impl.cc -index 8dd4307..e3a6baa 100644 +index 24122cd..52cd0c6 100644 --- web_contents_impl.cc +++ web_contents_impl.cc -@@ -1269,22 +1269,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1205,22 +1205,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { params.browser_context, params.site_instance, params.routing_id, params.main_frame_routing_id); @@ -48,7 +48,7 @@ index 8dd4307..e3a6baa 100644 } CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -1640,6 +1647,9 @@ void WebContentsImpl::CreateNewWindow( +@@ -1551,6 +1558,9 @@ void WebContentsImpl::CreateNewWindow( static_cast(session_storage_namespace); CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); @@ -58,7 +58,7 @@ index 8dd4307..e3a6baa 100644 if (delegate_ && !delegate_->ShouldCreateWebContents(this, route_id, -@@ -1648,7 +1658,9 @@ void WebContentsImpl::CreateNewWindow( +@@ -1559,7 +1569,9 @@ void WebContentsImpl::CreateNewWindow( params.frame_name, params.target_url, partition_id, @@ -69,7 +69,7 @@ index 8dd4307..e3a6baa 100644 if (route_id != MSG_ROUTING_NONE && !RenderViewHost::FromID(render_process_id, route_id)) { // If the embedder didn't create a WebContents for this route, we need to -@@ -1668,6 +1680,8 @@ void WebContentsImpl::CreateNewWindow( +@@ -1579,6 +1591,8 @@ void WebContentsImpl::CreateNewWindow( create_params.main_frame_routing_id = main_frame_route_id; create_params.opener = this; create_params.opener_suppressed = params.opener_suppressed; diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 8f0b6fbc5..1f04f5cb8 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,5 +1,5 @@ diff --git common.gypi common.gypi -index e32eae2..46c355a 100644 +index dccdfec..65b9540 100644 --- common.gypi +++ common.gypi @@ -9,6 +9,9 @@ diff --git a/patch/patches/chrome_browser_1257.patch b/patch/patches/chrome_browser_1257.patch index 4a74bcc09..318e41779 100644 --- a/patch/patches/chrome_browser_1257.patch +++ b/patch/patches/chrome_browser_1257.patch @@ -1,8 +1,8 @@ diff --git ui/browser.cc ui/browser.cc -index 21e292e..074b41e 100644 +index 50b6506..cc6a201 100644 --- ui/browser.cc +++ ui/browser.cc -@@ -1596,7 +1596,9 @@ bool Browser::ShouldCreateWebContents( +@@ -1592,7 +1592,9 @@ bool Browser::ShouldCreateWebContents( const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, @@ -14,10 +14,10 @@ index 21e292e..074b41e 100644 // If a BackgroundContents is created, suppress the normal WebContents. return !MaybeCreateBackgroundContents(route_id, diff --git ui/browser.h ui/browser.h -index fcb711c..5a59434 100644 +index 49c3962..4fac697 100644 --- ui/browser.h +++ ui/browser.h -@@ -588,7 +588,9 @@ class Browser : public TabStripModelObserver, +@@ -587,7 +587,9 @@ class Browser : public TabStripModelObserver, const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, diff --git a/patch/patches/chrome_pepper_flash_1586.patch b/patch/patches/chrome_pepper_flash_1586.patch index 2c1b9203e..b9b83a8dd 100644 --- a/patch/patches/chrome_pepper_flash_1586.patch +++ b/patch/patches/chrome_pepper_flash_1586.patch @@ -1,26 +1,19 @@ diff --git pepper_flash.cc pepper_flash.cc -index b21d4d1..11fac76 100644 +index da1c00d..f96c17d 100644 --- pepper_flash.cc +++ pepper_flash.cc -@@ -117,6 +117,14 @@ bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, - if (os != kPepperFlashOperatingSystem) - return false; +@@ -119,8 +119,15 @@ bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, + std::string arch; + manifest.GetStringASCII("x-ppapi-arch", &arch); +#if defined(OS_MACOSX) + // On Mac newer versions of the plugin are a universal binary and use "mac" + // as the value. -+ std::string arch; -+ manifest.GetStringASCII("x-ppapi-arch", &arch); + if (arch != kPepperFlashArch && arch != kPepperFlashOperatingSystem) + return false; +#else - // On Win64, PepperFlash manifests have "ia32" instead of "x64" so skip the - // architecture check. TODO(wfh): remove this when crbug.com/458894 is fixed. - #if !defined(OS_WIN) || !defined(ARCH_CPU_X86_64) -@@ -125,6 +133,7 @@ bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, if (arch != kPepperFlashArch) return false; - #endif +#endif *version_out = version; diff --git a/patch/patches/compositor_1368.patch b/patch/patches/compositor_1368.patch index da5e1957d..8b150368e 100644 --- a/patch/patches/compositor_1368.patch +++ b/patch/patches/compositor_1368.patch @@ -1,8 +1,8 @@ diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc -index dfb1041..4a4b14d 100644 +index 4fc6a67..ed42b09 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc -@@ -100,6 +100,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { +@@ -130,6 +130,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { scoped_ptr CreateSoftwareOutputDevice( ui::Compositor* compositor) { @@ -17,19 +17,19 @@ index dfb1041..4a4b14d 100644 return scoped_ptr(new SoftwareOutputDeviceWin( compositor)); diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 3a3e4cc..9fed916 100644 +index 5a6d932..07bd025 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h -@@ -13,6 +13,7 @@ - #include "base/observer_list.h" +@@ -15,6 +15,7 @@ #include "base/single_thread_task_runner.h" #include "base/time/time.h" + #include "cc/output/begin_frame_args.h" +#include "cc/output/software_output_device.h" #include "cc/surfaces/surface_sequence.h" #include "cc/trees/layer_tree_host_client.h" #include "cc/trees/layer_tree_host_single_thread_client.h" -@@ -132,6 +133,17 @@ class COMPOSITOR_EXPORT CompositorLock - DISALLOW_COPY_AND_ASSIGN(CompositorLock); +@@ -145,6 +146,17 @@ class COMPOSITOR_EXPORT CompositorBeginFrameObserver { + virtual void OnSendBeginFrame(const cc::BeginFrameArgs& args) = 0; }; +class COMPOSITOR_EXPORT CompositorDelegate { @@ -46,7 +46,7 @@ index 3a3e4cc..9fed916 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -153,6 +165,9 @@ class COMPOSITOR_EXPORT Compositor +@@ -166,6 +178,9 @@ class COMPOSITOR_EXPORT Compositor // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -56,7 +56,7 @@ index 3a3e4cc..9fed916 100644 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -305,6 +320,8 @@ class COMPOSITOR_EXPORT Compositor +@@ -322,6 +337,8 @@ class COMPOSITOR_EXPORT Compositor ui::ContextFactory* context_factory_; diff --git a/patch/patches/content_nav_1129.patch b/patch/patches/content_nav_1129.patch index 3b99fd7ba..9fa9a4d07 100644 --- a/patch/patches/content_nav_1129.patch +++ b/patch/patches/content_nav_1129.patch @@ -19,7 +19,7 @@ index 6e66fe3..32957fc 100644 bool ContentRendererClient::ShouldFork(blink::WebFrame* frame, const GURL& url, diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h -index 45176ab..07de846 100644 +index ca4d51d..5df0485 100644 --- public/renderer/content_renderer_client.h +++ public/renderer/content_renderer_client.h @@ -193,7 +193,6 @@ class CONTENT_EXPORT ContentRendererClient { @@ -39,10 +39,10 @@ index 45176ab..07de846 100644 // Returns true if we should fork a new process for the given navigation. // If |send_referrer| is set to false (which is the default), no referrer diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc -index 88c7bd4..70122f8 100644 +index 88b26d2..07ed0cb 100644 --- renderer/render_frame_impl.cc +++ renderer/render_frame_impl.cc -@@ -4006,7 +4006,6 @@ void RenderFrameImpl::OnCommitNavigation( +@@ -4076,7 +4076,6 @@ void RenderFrameImpl::OnCommitNavigation( WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( RenderFrame* render_frame, const NavigationPolicyInfo& info) { @@ -50,7 +50,7 @@ index 88c7bd4..70122f8 100644 // The handlenavigation API is deprecated and will be removed once // crbug.com/325351 is resolved. if (info.urlRequest.url() != GURL(kSwappedOutURL) && -@@ -4021,7 +4020,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( +@@ -4091,7 +4090,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( info.isRedirect)) { return blink::WebNavigationPolicyIgnore; } diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index a825bce63..d96c76f59 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,5 +1,5 @@ diff --git resource_ids resource_ids -index a64ae83..b32c534 100644 +index a0c369d..bea28d8 100644 --- resource_ids +++ resource_ids @@ -14,6 +14,12 @@ diff --git a/patch/patches/gyp_331.patch b/patch/patches/gyp_331.patch index b11f592c4..cc8d56cee 100644 --- a/patch/patches/gyp_331.patch +++ b/patch/patches/gyp_331.patch @@ -1,8 +1,8 @@ diff --git gyp/generator/ninja.py gyp/generator/ninja.py -index 09df83f..f2f7cd1 100644 +index 6823f4f..e8ee2b7 100644 --- gyp/generator/ninja.py +++ gyp/generator/ninja.py -@@ -738,7 +738,16 @@ class NinjaWriter(object): +@@ -741,7 +741,16 @@ class NinjaWriter(object): for path in copy['files']: # Normalize the path so trailing slashes don't confuse us. path = os.path.normpath(path) diff --git a/patch/patches/message_loop_443.patch b/patch/patches/message_loop_443.patch index e097bf1a7..74b8576cc 100644 --- a/patch/patches/message_loop_443.patch +++ b/patch/patches/message_loop_443.patch @@ -1,5 +1,5 @@ diff --git message_loop.cc message_loop.cc -index daa7782..6fea3c2 100644 +index eb0f968..1852eb1 100644 --- message_loop.cc +++ message_loop.cc @@ -152,12 +152,6 @@ MessageLoop::MessageLoop(scoped_ptr pump) diff --git a/patch/patches/net_urlrequest_1327.patch b/patch/patches/net_urlrequest_1327.patch index 039967980..06878fa79 100644 --- a/patch/patches/net_urlrequest_1327.patch +++ b/patch/patches/net_urlrequest_1327.patch @@ -1,8 +1,8 @@ diff --git url_request.h url_request.h -index 1623368..16d292d 100644 +index e623c20..c6c9058 100644 --- url_request.h +++ url_request.h -@@ -609,10 +609,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), +@@ -608,10 +608,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), return proxy_server_; } diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index dc73768a8..717a82ba1 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -35,10 +35,10 @@ index 8d25487..23b25ae 100644 bool slimming_paint_enabled; diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc -index 3f0f76f..bf84bdb 100644 +index c9cbd66..8124639 100644 --- renderer/render_view_impl.cc +++ renderer/render_view_impl.cc -@@ -940,6 +940,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, +@@ -932,6 +932,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, settings->setJavaEnabled(prefs.java_enabled); diff --git a/patch/patches/public_browser_1257.patch b/patch/patches/public_browser_1257.patch index 85b675974..8d007ed60 100644 --- a/patch/patches/public_browser_1257.patch +++ b/patch/patches/public_browser_1257.patch @@ -52,10 +52,10 @@ index 4380412..a67739d 100644 // Creates a new WebContents. diff --git web_contents_delegate.cc web_contents_delegate.cc -index 461927c..2217377 100644 +index 0e48d7c..aa46ad9 100644 --- web_contents_delegate.cc +++ web_contents_delegate.cc -@@ -137,7 +137,9 @@ bool WebContentsDelegate::ShouldCreateWebContents( +@@ -133,7 +133,9 @@ bool WebContentsDelegate::ShouldCreateWebContents( const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, @@ -67,7 +67,7 @@ index 461927c..2217377 100644 } diff --git web_contents_delegate.h web_contents_delegate.h -index d88b27c..fefbed2 100644 +index 1367f0b..7da1128 100644 --- web_contents_delegate.h +++ web_contents_delegate.h @@ -36,9 +36,11 @@ class DownloadItem; @@ -82,7 +82,7 @@ index d88b27c..fefbed2 100644 struct ColorSuggestion; struct ContextMenuParams; struct DropData; -@@ -314,7 +316,9 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -294,7 +296,9 @@ class CONTENT_EXPORT WebContentsDelegate { const base::string16& frame_name, const GURL& target_url, const std::string& partition_id, diff --git a/patch/patches/render_process_host_1429.patch b/patch/patches/render_process_host_1429.patch index 9d7cb6a08..ce7dc47d9 100644 --- a/patch/patches/render_process_host_1429.patch +++ b/patch/patches/render_process_host_1429.patch @@ -1,8 +1,8 @@ diff --git render_process_host_impl.cc render_process_host_impl.cc -index 4152ce2..9e235d3 100644 +index 91dd8b3..3cba806 100644 --- render_process_host_impl.cc +++ render_process_host_impl.cc -@@ -2084,6 +2084,8 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead, +@@ -2089,6 +2089,8 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead, #endif RemoveUserData(kSessionStorageHolderKey); @@ -11,7 +11,7 @@ index 4152ce2..9e235d3 100644 IDMap::iterator iter(&listeners_); while (!iter.IsAtEnd()) { iter.GetCurrentValue()->OnMessageReceived( -@@ -2093,8 +2095,6 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead, +@@ -2098,8 +2100,6 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead, iter.Advance(); } diff --git a/patch/patches/views_widget_180.patch b/patch/patches/views_widget_180.patch index 9c8e4ab62..8449882a3 100644 --- a/patch/patches/views_widget_180.patch +++ b/patch/patches/views_widget_180.patch @@ -12,10 +12,10 @@ index a8e088c..838b6a0 100644 return host ? host->GetAcceleratedWidget() : NULL; } diff --git desktop_aura/desktop_window_tree_host_win.cc desktop_aura/desktop_window_tree_host_win.cc -index b54a643..5a589e5 100644 +index b53fc7f..0b24d2a 100644 --- desktop_aura/desktop_window_tree_host_win.cc +++ desktop_aura/desktop_window_tree_host_win.cc -@@ -133,7 +133,9 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window, +@@ -134,7 +134,9 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window, native_widget_delegate_); HWND parent_hwnd = NULL; @@ -26,7 +26,7 @@ index b54a643..5a589e5 100644 parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget(); message_handler_->set_remove_standard_frame(params.remove_standard_frame); -@@ -820,6 +822,7 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -821,6 +823,7 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { // TODO(beng): inform the native_widget_delegate_. @@ -34,7 +34,7 @@ index b54a643..5a589e5 100644 InputMethod* input_method = GetInputMethod(); if (input_method) input_method->OnFocus(); -@@ -827,6 +830,7 @@ void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { +@@ -828,6 +831,7 @@ void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) { // TODO(beng): inform the native_widget_delegate_. @@ -153,26 +153,26 @@ index 94d4b1b..2609f46 100644 }; diff --git widget.cc widget.cc -index 15b810a..2f01d9e 100644 +index 8893d8c..e517828 100644 --- widget.cc +++ widget.cc -@@ -110,6 +110,7 @@ Widget::InitParams::InitParams() +@@ -111,6 +111,7 @@ Widget::InitParams::InitParams() use_system_default_icon(false), show_state(ui::SHOW_STATE_DEFAULT), parent(NULL), + parent_widget(gfx::kNullAcceleratedWidget), native_widget(NULL), desktop_window_tree_host(NULL), - layer_type(aura::WINDOW_LAYER_TEXTURED), -@@ -133,6 +134,7 @@ Widget::InitParams::InitParams(Type type) + layer_type(ui::LAYER_TEXTURED), +@@ -134,6 +135,7 @@ Widget::InitParams::InitParams(Type type) use_system_default_icon(false), show_state(ui::SHOW_STATE_DEFAULT), parent(NULL), + parent_widget(gfx::kNullAcceleratedWidget), native_widget(NULL), desktop_window_tree_host(NULL), - layer_type(aura::WINDOW_LAYER_TEXTURED), -@@ -307,7 +309,7 @@ void Widget::Init(const InitParams& in_params) { + layer_type(ui::LAYER_TEXTURED), +@@ -308,7 +310,7 @@ void Widget::Init(const InitParams& in_params) { InitParams params = in_params; params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -181,7 +181,7 @@ index 15b810a..2f01d9e 100644 if (params.opacity == views::Widget::InitParams::INFER_OPACITY && params.type != views::Widget::InitParams::TYPE_WINDOW && -@@ -370,7 +372,12 @@ void Widget::Init(const InitParams& in_params) { +@@ -371,7 +373,12 @@ void Widget::Init(const InitParams& in_params) { Minimize(); } else if (params.delegate) { SetContentsView(params.delegate->GetContentsView()); @@ -196,10 +196,10 @@ index 15b810a..2f01d9e 100644 // This must come after SetContentsView() or it might not be able to find // the correct NativeTheme (on Linux). See http://crbug.com/384492 diff --git widget.h widget.h -index 2f6030b..fdf4172 100644 +index 59e7b1d..bf888d7 100644 --- widget.h +++ widget.h -@@ -235,6 +235,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -234,6 +234,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // Whether the widget should be maximized or minimized. ui::WindowShowState show_state; gfx::NativeView parent; diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 71cafabf9..0c471fb00 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp -index 2565230..31a838f 100644 +index 606a744..4003e49 100644 --- Source/web/ChromeClientImpl.cpp +++ Source/web/ChromeClientImpl.cpp -@@ -735,7 +735,7 @@ bool ChromeClientImpl::hasOpenedPopup() const +@@ -775,7 +775,7 @@ bool ChromeClientImpl::hasOpenedPopup() const PassRefPtrWillBeRawPtr ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) { @@ -12,10 +12,10 @@ index 2565230..31a838f 100644 if (RuntimeEnabledFeatures::htmlPopupMenuEnabled() && RuntimeEnabledFeatures::pagePopupEnabled()) diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp -index 14c0dbf..0943bf2 100644 +index aa9c0c5..9f14208 100644 --- Source/web/WebViewImpl.cpp +++ Source/web/WebViewImpl.cpp -@@ -395,6 +395,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) +@@ -396,6 +396,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) , m_fakePageScaleAnimationPageScaleFactor(0) , m_fakePageScaleAnimationUseAnchor(false) , m_contextMenuAllowed(false) @@ -23,7 +23,7 @@ index 14c0dbf..0943bf2 100644 , m_doingDragAndDrop(false) , m_ignoreInputEvents(false) , m_compositorDeviceScaleFactorOverride(0) -@@ -4140,9 +4141,14 @@ void WebViewImpl::pageScaleFactorChanged() +@@ -4036,9 +4037,14 @@ void WebViewImpl::pageScaleFactorChanged() m_client->pageScaleFactorChanged(); } @@ -40,10 +40,10 @@ index 14c0dbf..0943bf2 100644 void WebViewImpl::startDragging(LocalFrame* frame, diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h -index 4c6e0a3..47b934b 100644 +index cf3f40e..f6acc16 100644 --- Source/web/WebViewImpl.h +++ Source/web/WebViewImpl.h -@@ -401,7 +401,8 @@ public: +@@ -394,7 +394,8 @@ public: // Returns true if popup menus should be rendered by the browser, false if // they should be rendered by WebKit (which is the default). @@ -53,7 +53,7 @@ index 4c6e0a3..47b934b 100644 bool contextMenuAllowed() const { -@@ -704,6 +705,8 @@ private: +@@ -688,6 +689,8 @@ private: bool m_contextMenuAllowed; @@ -63,10 +63,10 @@ index 4c6e0a3..47b934b 100644 bool m_ignoreInputEvents; diff --git public/web/WebView.h public/web/WebView.h -index 20aeff9..0eeda6e 100644 +index a7e9f99..f671362 100644 --- public/web/WebView.h +++ public/web/WebView.h -@@ -402,6 +402,7 @@ public: +@@ -403,6 +403,7 @@ public: // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void setUseExternalPopupMenus(bool);