diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-30 23:09:30 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-30 23:09:30 +0000 |
commit | 4a68c9ef3c575519b757581a3c9dca94140eb15c (patch) | |
tree | 00bb69a521626901bf848293e2bcbb7836dd479a /chrome/plugin | |
parent | a6adbe56f4f0e7482d4f553fc93a195d57ad5c91 (diff) | |
download | chromium_src-4a68c9ef3c575519b757581a3c9dca94140eb15c.zip chromium_src-4a68c9ef3c575519b757581a3c9dca94140eb15c.tar.gz chromium_src-4a68c9ef3c575519b757581a3c9dca94140eb15c.tar.bz2 |
Clean up DEPS rules against content so that not all chrome code can include anything from content.
I also moved ChromeContentPluginClient to chrome\plugin where it really belongs (i.e. to match what we do with the utility client).
Review URL: http://codereview.chromium.org/8095011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/DEPS | 4 | ||||
-rw-r--r-- | chrome/plugin/chrome_content_plugin_client.cc | 36 | ||||
-rw-r--r-- | chrome/plugin/chrome_content_plugin_client.h | 21 |
3 files changed, 61 insertions, 0 deletions
diff --git a/chrome/plugin/DEPS b/chrome/plugin/DEPS new file mode 100644 index 0000000..3851c20 --- /dev/null +++ b/chrome/plugin/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+content/plugin", + "+grit", +] diff --git a/chrome/plugin/chrome_content_plugin_client.cc b/chrome/plugin/chrome_content_plugin_client.cc new file mode 100644 index 0000000..b26f523 --- /dev/null +++ b/chrome/plugin/chrome_content_plugin_client.cc @@ -0,0 +1,36 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/plugin/chrome_content_plugin_client.h" + +#include "chrome/common/default_plugin.h" + +#if defined(OS_MACOSX) +#include "base/mac/mac_util.h" +#include "base/mac/scoped_cftyperef.h" +#include "base/sys_string_conversions.h" +#include "grit/chromium_strings.h" +#include "ui/base/l10n/l10n_util.h" +#endif + +namespace chrome { + +void ChromeContentPluginClient::PluginProcessStarted( + const string16& plugin_name) { +#if defined(OS_MACOSX) + base::mac::ScopedCFTypeRef<CFStringRef> cf_plugin_name( + base::SysUTF16ToCFStringRef(plugin_name)); + base::mac::ScopedCFTypeRef<CFStringRef> app_name( + base::SysUTF16ToCFStringRef( + l10n_util::GetStringUTF16(IDS_SHORT_PLUGIN_APP_NAME))); + base::mac::ScopedCFTypeRef<CFStringRef> process_name( + CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ (%@)"), + cf_plugin_name.get(), app_name.get())); + base::mac::SetProcessName(process_name); +#endif + + chrome::RegisterInternalDefaultPlugin(); +} + +} // namespace chrome diff --git a/chrome/plugin/chrome_content_plugin_client.h b/chrome/plugin/chrome_content_plugin_client.h new file mode 100644 index 0000000..b743660 --- /dev/null +++ b/chrome/plugin/chrome_content_plugin_client.h @@ -0,0 +1,21 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_PLUGIN_CHROME_CONTENT_PLUGIN_CLIENT_H_ +#define CHROME_PLUGIN_CHROME_CONTENT_PLUGIN_CLIENT_H_ +#pragma once + +#include "base/compiler_specific.h" +#include "content/plugin/content_plugin_client.h" + +namespace chrome { + +class ChromeContentPluginClient : public content::ContentPluginClient { + public: + virtual void PluginProcessStarted(const string16& plugin_name) OVERRIDE; +}; + +} // namespace chrome + +#endif // CHROME_PLUGIN_CHROME_CONTENT_PLUGIN_CLIENT_H_ |