diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index bb5b0bb72..02bb7fe43 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/53.0.2785.46', + 'chromium_checkout': 'refs/tags/53.0.2785.70', } diff --git a/libcef/browser/devtools_frontend.cc b/libcef/browser/devtools_frontend.cc index 542a1d9c7..490091626 100644 --- a/libcef/browser/devtools_frontend.cc +++ b/libcef/browser/devtools_frontend.cc @@ -320,6 +320,21 @@ void CefDevToolsFrontend::DispatchProtocolMessage( } } +void CefDevToolsFrontend::SetPreferences(const std::string& json) { + preferences_.Clear(); + if (json.empty()) + return; + base::DictionaryValue* dict = nullptr; + std::unique_ptr parsed = base::JSONReader::Read(json); + if (!parsed || !parsed->GetAsDictionary(&dict)) + return; + for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { + if (!it.value().IsType(base::Value::TYPE_STRING)) + continue; + preferences_.SetWithoutPathExpansion(it.key(), it.value().CreateDeepCopy()); + } +} + void CefDevToolsFrontend::OnURLFetchComplete(const net::URLFetcher* source) { // TODO(pfeldman): this is a copy of chrome's devtools_ui_bindings.cc. // We should handle some of the commands including this one in content. diff --git a/libcef/browser/devtools_frontend.h b/libcef/browser/devtools_frontend.h index b0e4e697b..a1f8720b3 100644 --- a/libcef/browser/devtools_frontend.h +++ b/libcef/browser/devtools_frontend.h @@ -62,7 +62,7 @@ class CefDevToolsFrontend : public content::WebContentsObserver, bool replaced) override; void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host, const std::string& message) override; - base::DictionaryValue* preferences() { return &preferences_; } + void SetPreferences(const std::string& json); // WebContentsObserver overrides void RenderViewCreated(content::RenderViewHost* render_view_host) override; diff --git a/patch/patches/browser_web_contents_1257.patch b/patch/patches/browser_web_contents_1257.patch index e7e1a40a5..3ef0960ce 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 ed42816..4513f67 100644 +index b9ee451..0a0e8e4 100644 --- web_contents_impl.cc +++ web_contents_impl.cc -@@ -1502,6 +1502,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1503,6 +1503,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name = params.main_frame_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -15,7 +15,7 @@ index ed42816..4513f67 100644 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -1534,6 +1540,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1535,6 +1541,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::move(view_), &render_view_host_delegate_view_)); } @@ -23,7 +23,7 @@ index ed42816..4513f67 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -1991,11 +1998,14 @@ void WebContentsImpl::CreateNewWindow( +@@ -1992,11 +1999,14 @@ void WebContentsImpl::CreateNewWindow( static_cast(session_storage_namespace); CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); @@ -39,7 +39,7 @@ index ed42816..4513f67 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 -@@ -2019,6 +2029,8 @@ void WebContentsImpl::CreateNewWindow( +@@ -2020,6 +2030,8 @@ void WebContentsImpl::CreateNewWindow( create_params.opener_render_process_id = render_process_id; create_params.opener_render_frame_id = params.opener_render_frame_id; create_params.opener_suppressed = params.opener_suppressed; diff --git a/patch/patches/views_widget_180_1481_1677_1749.patch b/patch/patches/views_widget_180_1481_1677_1749.patch index 68397c59b..333334675 100644 --- a/patch/patches/views_widget_180_1481_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1677_1749.patch @@ -146,7 +146,7 @@ index de96b63..ed0ba73 100644 bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) { diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index e71604d..937bf91 100644 +index e71604d..937bf913 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h @@ -137,6 +137,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin