From e979611ea6dd0a27f67dc7df313e800f4e966b84 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 11 Aug 2015 18:08:35 -0400 Subject: [PATCH] Update to Chromium version 45.0.2454.26 --- CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- libcef/browser/chrome_browser_process_stub.cc | 6 +++ libcef/browser/chrome_browser_process_stub.h | 2 + libcef/common/content_client.cc | 41 ++++--------------- libcef/common/main_delegate.cc | 28 +++++++------ patch/patches/browser_web_contents_1257.patch | 10 ++--- patch/patches/webkit_popups.patch | 10 ++--- 7 files changed, 42 insertions(+), 57 deletions(-) diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index dbbdddd69..eaf755441 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/45.0.2454.15', + 'chromium_checkout': 'refs/tags/45.0.2454.26', } diff --git a/libcef/browser/chrome_browser_process_stub.cc b/libcef/browser/chrome_browser_process_stub.cc index 7bb00dccc..166432024 100644 --- a/libcef/browser/chrome_browser_process_stub.cc +++ b/libcef/browser/chrome_browser_process_stub.cc @@ -278,3 +278,9 @@ memory::OomPriorityManager* ChromeBrowserProcessStub::GetOomPriorityManager() { NOTIMPLEMENTED(); return NULL; } + +ShellIntegration::DefaultWebClientState +ChromeBrowserProcessStub::CachedDefaultWebClientState() { + NOTIMPLEMENTED(); + return ShellIntegration::UNKNOWN_DEFAULT; +} diff --git a/libcef/browser/chrome_browser_process_stub.h b/libcef/browser/chrome_browser_process_stub.h index b33d147e3..79c6c13d7 100644 --- a/libcef/browser/chrome_browser_process_stub.h +++ b/libcef/browser/chrome_browser_process_stub.h @@ -97,6 +97,8 @@ class ChromeBrowserProcessStub : public BrowserProcess { network_time::NetworkTimeTracker* network_time_tracker() override; gcm::GCMDriver* gcm_driver() override; memory::OomPriorityManager* GetOomPriorityManager() override; + ShellIntegration::DefaultWebClientState + CachedDefaultWebClientState() override; private: std::string locale_; diff --git a/libcef/common/content_client.cc b/libcef/common/content_client.cc index 4d7b7a936..56dda9eac 100644 --- a/libcef/common/content_client.cc +++ b/libcef/common/content_client.cc @@ -135,17 +135,6 @@ void AddPepperFlashFromCommandLine( CreatePepperFlashInfo(base::FilePath(flash_path), flash_version)); } -#if defined(OS_WIN) -const char kPepperFlashDLLBaseName[] = -#if defined(ARCH_CPU_X86) - "pepflashplayer32_"; -#elif defined(ARCH_CPU_X86_64) - "pepflashplayer64_"; -#else -#error Unsupported Windows CPU architecture. -#endif // defined(ARCH_CPU_X86) -#endif // defined(OS_WIN) - bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) { base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); @@ -157,14 +146,14 @@ bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) { if (command_line->HasSwitch(switches::kPpapiFlashPath)) return false; - base::FilePath flash_path; - if (!PathService::Get(chrome::DIR_PEPPER_FLASH_SYSTEM_PLUGIN, &flash_path)) + base::FilePath flash_filename; + if (!PathService::Get(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN, + &flash_filename)) { return false; + } - if (!base::PathExists(flash_path)) - return false; - - base::FilePath manifest_path(flash_path.AppendASCII("manifest.json")); + base::FilePath manifest_path( + flash_filename.DirName().AppendASCII("manifest.json")); std::string manifest_data; if (!base::ReadFileToString(manifest_path, &manifest_data)) @@ -181,23 +170,7 @@ bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) { if (!chrome::CheckPepperFlashManifest(*manifest, &version)) return false; -#if defined(OS_WIN) - // PepperFlash DLLs on Windows look like basename_v_x_y_z.dll. - std::string filename(kPepperFlashDLLBaseName); - filename.append(version.GetString()); - base::ReplaceChars(filename, ".", "_", &filename); - filename.append(".dll"); - - base::FilePath path(flash_path.Append(base::ASCIIToUTF16(filename))); -#else - // PepperFlash on OS X is called PepperFlashPlayer.plugin - base::FilePath path(flash_path.Append(chrome::kPepperFlashPluginFilename)); -#endif - - if (!base::PathExists(path)) - return false; - - *plugin = CreatePepperFlashInfo(path, version.GetString()); + *plugin = CreatePepperFlashInfo(flash_filename, version.GetString()); return true; } diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 0da8ec880..02a0829d1 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -23,6 +23,7 @@ #include "base/synchronization/waitable_event.h" #include "base/threading/thread.h" #include "chrome/child/pdf_child_init.h" +#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "content/public/browser/browser_main_runner.h" @@ -131,18 +132,19 @@ base::FilePath GetResourcesFilePath() { #if defined(OS_WIN) -const wchar_t kFlashRegistryRoot[] = L"SOFTWARE\\Macromedia\\FlashPlayerPepper"; -const wchar_t kFlashPlayerPathValueName[] = L"PlayerPath"; - // Gets the Flash path if installed on the system. -bool GetSystemFlashDirectory(base::FilePath* out_path) { - base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kFlashRegistryRoot, KEY_READ); +bool GetSystemFlashFilename(base::FilePath* out_path) { + const wchar_t kPepperFlashRegistryRoot[] = + L"SOFTWARE\\Macromedia\\FlashPlayerPepper"; + const wchar_t kFlashPlayerPathValueName[] = L"PlayerPath"; + + base::win::RegKey path_key( + HKEY_LOCAL_MACHINE, kPepperFlashRegistryRoot, KEY_READ); base::string16 path_str; if (FAILED(path_key.ReadValue(kFlashPlayerPathValueName, &path_str))) return false; - base::FilePath plugin_path = base::FilePath(path_str).DirName(); - *out_path = plugin_path; + *out_path = base::FilePath(path_str); return true; } @@ -154,20 +156,22 @@ const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] = #endif void OverridePepperFlashSystemPluginPath() { - base::FilePath plugin_path; + base::FilePath plugin_filename; #if defined(OS_WIN) - if (!GetSystemFlashDirectory(&plugin_path)) + if (!GetSystemFlashFilename(&plugin_filename)) return; #elif defined(OS_MACOSX) - if (!util_mac::GetLocalLibraryDirectory(&plugin_path)) + if (!util_mac::GetLocalLibraryDirectory(&plugin_filename)) return; - plugin_path = plugin_path.Append(kPepperFlashSystemBaseDirectory); + plugin_filename = plugin_filename.Append(kPepperFlashSystemBaseDirectory) + .Append(chrome::kPepperFlashPluginFilename); #else // A system plugin is not available on other platforms. return; #endif - PathService::Override(chrome::DIR_PEPPER_FLASH_SYSTEM_PLUGIN, plugin_path); + PathService::Override(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN, + plugin_filename); } #if defined(OS_LINUX) diff --git a/patch/patches/browser_web_contents_1257.patch b/patch/patches/browser_web_contents_1257.patch index 32488b618..da25e697f 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 3aedda6..b4aa061 100644 +index 1383981..2c39457 100644 --- web_contents_impl.cc +++ web_contents_impl.cc -@@ -1312,24 +1312,31 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1319,24 +1319,31 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { params.main_frame_routing_id); frame_tree_.root()->SetFrameName(params.main_frame_name); @@ -51,7 +51,7 @@ index 3aedda6..b4aa061 100644 } CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -1665,6 +1672,9 @@ void WebContentsImpl::CreateNewWindow( +@@ -1672,6 +1679,9 @@ void WebContentsImpl::CreateNewWindow( static_cast(session_storage_namespace); CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); @@ -61,7 +61,7 @@ index 3aedda6..b4aa061 100644 if (delegate_ && !delegate_->ShouldCreateWebContents(this, route_id, -@@ -1673,7 +1683,9 @@ void WebContentsImpl::CreateNewWindow( +@@ -1680,7 +1690,9 @@ void WebContentsImpl::CreateNewWindow( params.frame_name, params.target_url, partition_id, @@ -72,7 +72,7 @@ index 3aedda6..b4aa061 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 -@@ -1695,6 +1707,8 @@ void WebContentsImpl::CreateNewWindow( +@@ -1702,6 +1714,8 @@ void WebContentsImpl::CreateNewWindow( create_params.opener_render_process_id = GetRenderProcessHost()->GetID(); create_params.opener_render_frame_id = params.opener_render_frame_id; create_params.opener_suppressed = params.opener_suppressed; diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 3189e95a3..6b9e13cba 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,5 +1,5 @@ diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp -index 58e8166..23c0cea 100644 +index 690a8c2..4c08e15 100644 --- Source/web/ChromeClientImpl.cpp +++ Source/web/ChromeClientImpl.cpp @@ -774,7 +774,7 @@ bool ChromeClientImpl::hasOpenedPopup() const @@ -12,7 +12,7 @@ index 58e8166..23c0cea 100644 ASSERT(RuntimeEnabledFeatures::pagePopupEnabled()); diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp -index 1f8413a..efeff15 100644 +index a21d33a..27bc146 100644 --- Source/web/WebViewImpl.cpp +++ Source/web/WebViewImpl.cpp @@ -397,6 +397,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) @@ -23,7 +23,7 @@ index 1f8413a..efeff15 100644 , m_doingDragAndDrop(false) , m_ignoreInputEvents(false) , m_compositorDeviceScaleFactorOverride(0) -@@ -3925,9 +3926,14 @@ void WebViewImpl::pageScaleFactorChanged() +@@ -3932,9 +3933,14 @@ void WebViewImpl::pageScaleFactorChanged() m_client->pageScaleFactorChanged(); } @@ -40,7 +40,7 @@ index 1f8413a..efeff15 100644 void WebViewImpl::startDragging(LocalFrame* frame, diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h -index a3ece01..60adce4 100644 +index 7f2884d..1a5d3b2 100644 --- Source/web/WebViewImpl.h +++ Source/web/WebViewImpl.h @@ -389,7 +389,8 @@ public: @@ -53,7 +53,7 @@ index a3ece01..60adce4 100644 bool contextMenuAllowed() const { -@@ -675,6 +676,8 @@ private: +@@ -677,6 +678,8 @@ private: bool m_contextMenuAllowed;