diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-05-09 14:22:11 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-05-09 15:11:45 +0000 |
commit | 2ddb2d3e14eef3de7dbd0cef553d669b9ac2361c (patch) | |
tree | e75f511546c5fd1a173e87c1f9fb11d7ac8d1af3 /chromium/content/ppapi_plugin | |
parent | a4f3d46271c57e8155ba912df46a05559d14726e (diff) | |
download | qtwebengine-chromium-2ddb2d3e14eef3de7dbd0cef553d669b9ac2361c.tar.gz |
BASELINE: Update Chromium to 51.0.2704.41
Also adds in all smaller components by reversing logic for exclusion.
Change-Id: Ibf90b506e7da088ea2f65dcf23f2b0992c504422
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'chromium/content/ppapi_plugin')
-rw-r--r-- | chromium/content/ppapi_plugin/BUILD.gn | 14 | ||||
-rw-r--r-- | chromium/content/ppapi_plugin/DEPS | 3 | ||||
-rw-r--r-- | chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc | 8 | ||||
-rw-r--r-- | chromium/content/ppapi_plugin/ppapi_plugin_main.cc | 26 | ||||
-rw-r--r-- | chromium/content/ppapi_plugin/ppapi_thread.cc | 36 |
5 files changed, 31 insertions, 56 deletions
diff --git a/chromium/content/ppapi_plugin/BUILD.gn b/chromium/content/ppapi_plugin/BUILD.gn index e127a3d2756..e8dfe47d7df 100644 --- a/chromium/content/ppapi_plugin/BUILD.gn +++ b/chromium/content/ppapi_plugin/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. group("ppapi_plugin") { - visibility = [ "//content/*" ] + visibility = [ "//content/*" ] # This is an internal content API. if (is_component_build) { public_deps = [ @@ -17,7 +17,12 @@ group("ppapi_plugin") { } source_set("ppapi_plugin_sources") { - visibility = [ "//content/*" ] + # Depend on via ":ppapi_plugin above. + visibility = [ + ":ppapi_plugin", + "//content", # For the component build. + "//gin", + ] sources = [ "broker_process_dispatcher.cc", @@ -32,7 +37,10 @@ source_set("ppapi_plugin_sources") { "ppapi_thread.h", ] - configs += [ "//content:content_implementation" ] + configs += [ + "//content:content_implementation", + "//v8:external_startup_data", + ] deps = [ "//base", diff --git a/chromium/content/ppapi_plugin/DEPS b/chromium/content/ppapi_plugin/DEPS index bde9e92ce49..9959c2fe7b8 100644 --- a/chromium/content/ppapi_plugin/DEPS +++ b/chromium/content/ppapi_plugin/DEPS @@ -1,6 +1,7 @@ include_rules = [ "+content/child", - "+content/public/plugin", + "+gin/public/isolate_holder.h", + "+gin/v8_initializer.h", "+ppapi/c", "+ppapi/proxy", ] diff --git a/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc b/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc index e2f25c651a2..01c04ece935 100644 --- a/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc +++ b/chromium/content/ppapi_plugin/ppapi_blink_platform_impl.cc @@ -50,9 +50,9 @@ class PpapiBlinkPlatformImpl::SandboxSupport : public WebSandboxSupport { WebUChar32 character, const char* preferred_locale, blink::WebFallbackFont* fallbackFont) override; - void getRenderStyleForStrike(const char* family, - int sizeAndStyle, - blink::WebFontRenderStyle* out) override; + void getWebFontRenderStyleForStrike(const char* family, + int sizeAndStyle, + blink::WebFontRenderStyle* out) override; private: // WebKit likes to ask us for the correct font family to use for a set of @@ -105,7 +105,7 @@ void PpapiBlinkPlatformImpl::SandboxSupport::getFallbackFontForCharacter( unicode_font_families_.insert(std::make_pair(character, *fallbackFont)); } -void PpapiBlinkPlatformImpl::SandboxSupport::getRenderStyleForStrike( +void PpapiBlinkPlatformImpl::SandboxSupport::getWebFontRenderStyleForStrike( const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out) { diff --git a/chromium/content/ppapi_plugin/ppapi_plugin_main.cc b/chromium/content/ppapi_plugin/ppapi_plugin_main.cc index 53bd14ce34b..ccd05e9111b 100644 --- a/chromium/content/ppapi_plugin/ppapi_plugin_main.cc +++ b/chromium/content/ppapi_plugin/ppapi_plugin_main.cc @@ -19,7 +19,6 @@ #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" -#include "content/public/plugin/content_plugin_client.h" #include "ipc/ipc_sender.h" #include "ppapi/proxy/plugin_globals.h" #include "ppapi/proxy/proxy_module.h" @@ -29,8 +28,6 @@ #include "base/win/win_util.h" #include "base/win/windows_version.h" #include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h" -#include "content/common/font_warmup_win.h" -#include "content/public/common/dwrite_font_platform_win.h" #include "sandbox/win/src/sandbox.h" #include "third_party/WebKit/public/web/win/WebFontRendering.h" #include "third_party/skia/include/ports/SkTypeface_win.h" @@ -46,6 +43,10 @@ #include "content/public/common/sandbox_init.h" #endif +#ifdef V8_USE_EXTERNAL_STARTUP_DATA +#include "gin/v8_initializer.h" +#endif + #if defined(OS_POSIX) && !defined(OS_ANDROID) #include <stdlib.h> #endif @@ -124,10 +125,10 @@ int PpapiPluginMain(const MainFunctionParams& parameters) { base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( kTraceEventPpapiProcessSortIndex); - // Allow the embedder to perform any necessary per-process initialization - // before the sandbox is initialized. - if (GetContentClient()->plugin()) - GetContentClient()->plugin()->PreSandboxInitialization(); +#ifdef V8_USE_EXTERNAL_STARTUP_DATA + gin::V8Initializer::LoadV8Snapshot(); + gin::V8Initializer::LoadV8Natives(); +#endif #if defined(OS_LINUX) LinuxSandbox::InitializeSandbox(); @@ -142,13 +143,7 @@ int PpapiPluginMain(const MainFunctionParams& parameters) { gfx::win::MaybeInitializeDirectWrite(); bool use_direct_write = gfx::win::IsDirectWriteEnabled(); if (use_direct_write) { - if (ShouldUseDirectWriteFontProxyFieldTrial()) { - InitializeDWriteFontProxy( - base::Bind(&ppapi::proxy::PluginGlobals::GetBrowserSender, - base::Unretained(ppapi::proxy::PluginGlobals::Get()))); - } else { - WarmupDirectWrite(); - } + InitializeDWriteFontProxy(); } else { SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); } @@ -160,8 +155,7 @@ int PpapiPluginMain(const MainFunctionParams& parameters) { main_message_loop.Run(); #if defined(OS_WIN) - if (ShouldUseDirectWriteFontProxyFieldTrial()) - UninitializeDWriteFontProxy(); + UninitializeDWriteFontProxy(); #endif return 0; } diff --git a/chromium/content/ppapi_plugin/ppapi_thread.cc b/chromium/content/ppapi_plugin/ppapi_thread.cc index c1cd0801d07..8e0724b5e6b 100644 --- a/chromium/content/ppapi_plugin/ppapi_thread.cc +++ b/chromium/content/ppapi_plugin/ppapi_thread.cc @@ -36,7 +36,6 @@ #include "content/public/common/content_switches.h" #include "content/public/common/pepper_plugin_info.h" #include "content/public/common/sandbox_init.h" -#include "content/public/plugin/content_plugin_client.h" #include "ipc/ipc_channel_handle.h" #include "ipc/ipc_platform_file.h" #include "ipc/ipc_sync_channel.h" @@ -55,7 +54,7 @@ #if defined(OS_WIN) #include "base/win/win_util.h" #include "base/win/windows_version.h" -#include "content/common/font_warmup_win.h" +#include "content/child/font_warmup_win.h" #include "sandbox/win/src/sandbox.h" #elif defined(OS_MACOSX) #include "content/common/sandbox_init_mac.h" @@ -118,7 +117,7 @@ PpapiThread::PpapiThread(const base::CommandLine& command_line, bool is_broker) command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); blink_platform_impl_.reset(new PpapiBlinkPlatformImpl); - blink::initializeWithoutV8(blink_platform_impl_.get()); + blink::Platform::initialize(blink_platform_impl_.get()); if (!is_broker_) { scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter( @@ -146,7 +145,7 @@ void PpapiThread::Shutdown() { if (plugin_entry_points_.shutdown_module) plugin_entry_points_.shutdown_module(); blink_platform_impl_->Shutdown(); - blink::shutdownWithoutV8(); + blink::Platform::shutdown(); } bool PpapiThread::Send(IPC::Message* msg) { @@ -196,8 +195,7 @@ IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( #if defined(OS_WIN) if (peer_handle_.IsValid()) { DCHECK(is_broker_); - return IPC::GetFileHandleForProcess(handle, peer_handle_.Get(), - should_close_source); + return IPC::GetPlatformFileForTransit(handle, should_close_source); } #endif @@ -208,27 +206,8 @@ IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( base::SharedMemoryHandle PpapiThread::ShareSharedMemoryHandleWithRemote( const base::SharedMemoryHandle& handle, base::ProcessId remote_pid) { -#if defined(OS_WIN) - if (peer_handle_.IsValid()) { - DCHECK(is_broker_); - IPC::PlatformFileForTransit platform_file = IPC::GetFileHandleForProcess( - handle.GetHandle(), peer_handle_.Get(), false); - base::ProcessId pid = base::GetProcId(peer_handle_.Get()); - return base::SharedMemoryHandle(platform_file, pid); - } -#endif - DCHECK(remote_pid != base::kNullProcessId); -#if defined(OS_WIN) || defined(OS_MACOSX) - base::SharedMemoryHandle duped_handle; - bool success = - BrokerDuplicateSharedMemoryHandle(handle, remote_pid, &duped_handle); - if (success) - return duped_handle; - return base::SharedMemory::NULLHandle(); -#else return base::SharedMemory::DuplicateHandle(handle); -#endif // defined(OS_WIN) || defined(OS_MACOSX) } std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() { @@ -569,13 +548,6 @@ bool PpapiThread::SetupRendererChannel(base::ProcessId renderer_pid, void PpapiThread::SavePluginName(const base::FilePath& path) { ppapi::proxy::PluginGlobals::Get()->set_plugin_name( path.BaseName().AsUTF8Unsafe()); - - // plugin() is NULL when in-process, which is fine, because this is - // just a hook for setting the process name. - if (GetContentClient()->plugin()) { - GetContentClient()->plugin()->PluginProcessStarted( - path.BaseName().RemoveExtension().LossyDisplayName()); - } } static std::string GetHistogramName(bool is_broker, |