summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-22 19:02:42 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-22 19:02:42 +0000
commitb157eed6ea9f4501aeeac85973776392cc52db9b (patch)
treee205009db1b9baf6f7d837dbd528722ec2220d50 /content/ppapi_plugin
parenta7aff7c701d98265f477d93aff583f948bd1c2eb (diff)
downloadchromium_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/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/DEPS1
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc8
2 files changed, 9 insertions, 0 deletions
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());
+ }
}