diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-22 19:02:42 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-22 19:02:42 +0000 |
commit | b157eed6ea9f4501aeeac85973776392cc52db9b (patch) | |
tree | e205009db1b9baf6f7d837dbd528722ec2220d50 /content | |
parent | a7aff7c701d98265f477d93aff583f948bd1c2eb (diff) | |
download | chromium_src-b157eed6ea9f4501aeeac85973776392cc52db9b.zip chromium_src-b157eed6ea9f4501aeeac85973776392cc52db9b.tar.gz chromium_src-b157eed6ea9f4501aeeac85973776392cc52db9b.tar.bz2 |
[Mac] More descriptive process name for flapper.
Put plugin basename without extension in process name. The
human-readable name used for NPAPI version will be a little more
complicated to land, so punting for now.
BUG=132244
TEST=Activity Monitor app shows "PepperFlashPlayer" under Process Name.
Review URL: https://chromiumcodereview.appspot.com/10548031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143659 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/app/content_main_runner.cc | 3 | ||||
-rw-r--r-- | content/ppapi_plugin/DEPS | 1 | ||||
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.cc | 8 |
3 files changed, 11 insertions, 1 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index 53d8a82..3e2a3af 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -240,7 +240,8 @@ class ContentClientInitializer { content_client->browser_ = &g_empty_content_browser_client.Get(); } - if (process_type == switches::kPluginProcess) { + if (process_type == switches::kPluginProcess || + process_type == switches::kPpapiPluginProcess) { if (delegate) content_client->plugin_ = delegate->CreateContentPluginClient(); if (!content_client->plugin_) diff --git a/content/ppapi_plugin/DEPS b/content/ppapi_plugin/DEPS index 99326cf..1f10e93 100644 --- a/content/ppapi_plugin/DEPS +++ b/content/ppapi_plugin/DEPS @@ -1,5 +1,6 @@ include_rules = [ "-chrome", + "+content/public/plugin", "+ppapi/c", "+ppapi/proxy", ] diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index eab38dc..e79abe5 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -17,6 +17,7 @@ #include "content/ppapi_plugin/plugin_process_dispatcher.h" #include "content/ppapi_plugin/ppapi_webkitplatformsupport_impl.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" @@ -367,4 +368,11 @@ bool PpapiThread::SetupRendererChannel(int renderer_id, void PpapiThread::SavePluginName(const 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 (content::GetContentClient()->plugin()) { + content::GetContentClient()->plugin()->PluginProcessStarted( + path.BaseName().RemoveExtension().LossyDisplayName()); + } } |