diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/ppapi_plugin_process_host.cc | 1 | ||||
-rw-r--r-- | content/ppapi_plugin/ppapi_broker_main.cc | 3 | ||||
-rw-r--r-- | content/ppapi_plugin/ppapi_plugin_main.cc | 6 | ||||
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.cc | 10 | ||||
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.h | 3 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 3 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 1 | ||||
-rw-r--r-- | content/renderer/pepper/pepper_plugin_delegate_impl.cc | 10 | ||||
-rw-r--r-- | content/renderer/pepper/pepper_plugin_delegate_impl.h | 1 |
9 files changed, 16 insertions, 22 deletions
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc index 864bc56..fa9d9c8 100644 --- a/content/browser/ppapi_plugin_process_host.cc +++ b/content/browser/ppapi_plugin_process_host.cc @@ -22,6 +22,7 @@ #include "ipc/ipc_switches.h" #include "net/base/network_change_notifier.h" #include "ppapi/proxy/ppapi_messages.h" +#include "webkit/plugins/plugin_switches.h" using content::ChildProcessHost; using content::ChildProcessHostImpl; diff --git a/content/ppapi_plugin/ppapi_broker_main.cc b/content/ppapi_plugin/ppapi_broker_main.cc index 7963e29..a9b00ba 100644 --- a/content/ppapi_plugin/ppapi_broker_main.cc +++ b/content/ppapi_plugin/ppapi_broker_main.cc @@ -21,7 +21,8 @@ int PpapiBrokerMain(const content::MainFunctionParams& parameters) { base::PlatformThread::SetName("CrPPAPIBrokerMain"); ChildProcess ppapi_broker_process; - ppapi_broker_process.set_main_thread(new PpapiThread(true)); // Broker. + ppapi_broker_process.set_main_thread( + new PpapiThread(parameters.command_line, true)); // Broker. main_message_loop.Run(); DVLOG(1) << "PpapiBrokerMain exiting"; diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc index c4f5054..7f79f48 100644 --- a/content/ppapi_plugin/ppapi_plugin_main.cc +++ b/content/ppapi_plugin/ppapi_plugin_main.cc @@ -53,10 +53,8 @@ int PpapiPluginMain(const content::MainFunctionParams& parameters) { #endif ChildProcess ppapi_process; - ppapi_process.set_main_thread(new PpapiThread(false)); // Not a broker. - - ppapi::proxy::ProxyModule::GetInstance()->SetFlashCommandLineArgs( - command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); + ppapi_process.set_main_thread( + new PpapiThread(parameters.command_line, false)); // Not a broker. main_message_loop.Run(); return 0; diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index da49c12..1a4fa68 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -16,7 +16,6 @@ #include "content/ppapi_plugin/broker_process_dispatcher.h" #include "content/ppapi_plugin/plugin_process_dispatcher.h" #include "content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h" -#include "content/public/common/content_switches.h" #include "content/public/common/sandbox_init.h" #include "ipc/ipc_channel_handle.h" #include "ipc/ipc_sync_channel.h" @@ -27,6 +26,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/interface_list.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "webkit/plugins/plugin_switches.h" #if defined(OS_WIN) #include "sandbox/src/sandbox.h" @@ -43,14 +43,18 @@ extern void* g_target_services; typedef int32_t (*InitializeBrokerFunc) (PP_ConnectInstance_Func* connect_instance_func); -PpapiThread::PpapiThread(bool is_broker) +PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker) : is_broker_(is_broker), get_plugin_interface_(NULL), connect_instance_func_(NULL), local_pp_module_( base::RandInt(0, std::numeric_limits<PP_Module>::max())), next_plugin_dispatcher_id_(1) { - ppapi::proxy::PluginGlobals::Get()->set_plugin_proxy_delegate(this); + ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get(); + globals->set_plugin_proxy_delegate(this); + globals->set_command_line( + command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); + webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl); WebKit::initialize(webkit_platform_support_.get()); } diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h index 6cd0eb0..fa071df 100644 --- a/content/ppapi_plugin/ppapi_thread.h +++ b/content/ppapi_plugin/ppapi_thread.h @@ -22,6 +22,7 @@ #include "ppapi/proxy/plugin_globals.h" #include "ppapi/proxy/plugin_proxy_delegate.h" +class CommandLine; class FilePath; class PpapiWebKitPlatformSupportImpl; @@ -33,7 +34,7 @@ class PpapiThread : public ChildThread, public ppapi::proxy::PluginDispatcher::PluginDelegate, public ppapi::proxy::PluginProxyDelegate { public: - explicit PpapiThread(bool is_broker); + PpapiThread(const CommandLine& command_line, bool is_broker); virtual ~PpapiThread(); private: diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 5383d65..126b37c 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -445,9 +445,6 @@ const char kPluginStartupDialog[] = "plugin-startup-dialog"; // Argument to the process type that indicates a PPAPI broker process type. const char kPpapiBrokerProcess[] = "ppapi-broker"; -// "Command-line" arguments for the PPAPI Flash; used for debugging options. -const char kPpapiFlashArgs[] = "ppapi-flash-args"; - // Use the PPAPI (Pepper) Flash found at the given path. const char kPpapiFlashPath[] = "ppapi-flash-path"; diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index c9b26bd..b79b0b7 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -139,7 +139,6 @@ CONTENT_EXPORT extern const char kPluginPath[]; CONTENT_EXPORT extern const char kPluginProcess[]; extern const char kPluginStartupDialog[]; CONTENT_EXPORT extern const char kPpapiBrokerProcess[]; -CONTENT_EXPORT extern const char kPpapiFlashArgs[]; CONTENT_EXPORT extern const char kPpapiFlashPath[]; CONTENT_EXPORT extern const char kPpapiFlashVersion[]; CONTENT_EXPORT extern const char kPpapiOutOfProcess[]; diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc index debbd55..2f7eb8b 100644 --- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc @@ -1139,7 +1139,7 @@ int32_t PepperPluginDelegateImpl::ShowContextMenu( webkit::ppapi::PPB_Flash_Menu_Impl* menu, const gfx::Point& position) { int32 render_widget_id = render_view_->routing_id(); - if (instance->FlashIsFullscreen(instance->pp_instance())) { + if (instance->flash_fullscreen()) { webkit::ppapi::FullscreenContainer* container = instance->fullscreen_container(); DCHECK(container); @@ -1159,8 +1159,7 @@ int32_t PepperPluginDelegateImpl::ShowContextMenu( params.custom_items = menu->menu_data(); // Transform the position to be in render view's coordinates. - if (instance->view_data().is_fullscreen || - instance->FlashIsFullscreen(instance->pp_instance())) { + if (instance->view_data().is_fullscreen || instance->flash_fullscreen()) { WebKit::WebRect rect = render_view_->windowRect(); params.x -= rect.x; params.y -= rect.y; @@ -1275,11 +1274,6 @@ double PepperPluginDelegateImpl::GetLocalTimeZoneOffset(base::Time t) { return result; } -std::string PepperPluginDelegateImpl::GetFlashCommandLineArgs() { - return CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kPpapiFlashArgs); -} - base::SharedMemory* PepperPluginDelegateImpl::CreateAnonymousSharedMemory( uint32_t size) { if (size == 0) diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.h b/content/renderer/pepper/pepper_plugin_delegate_impl.h index 36c82d2..c003a07 100644 --- a/content/renderer/pepper/pepper_plugin_delegate_impl.h +++ b/content/renderer/pepper/pepper_plugin_delegate_impl.h @@ -348,7 +348,6 @@ class PepperPluginDelegateImpl virtual void SaveURLAs(const GURL& url) OVERRIDE; virtual webkit_glue::P2PTransport* CreateP2PTransport() OVERRIDE; virtual double GetLocalTimeZoneOffset(base::Time t) OVERRIDE; - virtual std::string GetFlashCommandLineArgs() OVERRIDE; virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) OVERRIDE; virtual ::ppapi::Preferences GetPreferences() OVERRIDE; |