summaryrefslogtreecommitdiffstats
path: root/content/plugin
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-21 19:52:47 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-21 19:52:47 +0000
commit91355a856f83888eab29f6a3299aa7c0fe69c3e3 (patch)
tree99ecc647ffb3988279cc768a5a00b7d5a32125ce /content/plugin
parent8463d75aed2831944bfc7471ef239b0c6e31a6ca (diff)
downloadchromium_src-91355a856f83888eab29f6a3299aa7c0fe69c3e3.zip
chromium_src-91355a856f83888eab29f6a3299aa7c0fe69c3e3.tar.gz
chromium_src-91355a856f83888eab29f6a3299aa7c0fe69c3e3.tar.bz2
Move content's a plugin, ppapi_plugin, utility, and worker subdirectories to the content namespace.
Review URL: https://codereview.chromium.org/11231016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin')
-rw-r--r--content/plugin/plugin_channel.cc4
-rw-r--r--content/plugin/plugin_channel.h4
-rw-r--r--content/plugin/plugin_interpose_util_mac.mm2
-rw-r--r--content/plugin/plugin_main.cc6
-rw-r--r--content/plugin/plugin_main_linux.cc4
-rw-r--r--content/plugin/plugin_main_mac.mm6
-rw-r--r--content/plugin/plugin_thread.cc8
-rw-r--r--content/plugin/plugin_thread.h4
-rw-r--r--content/plugin/webplugin_accelerated_surface_proxy_mac.cc4
-rw-r--r--content/plugin/webplugin_accelerated_surface_proxy_mac.h6
-rw-r--r--content/plugin/webplugin_delegate_stub.cc10
-rw-r--r--content/plugin/webplugin_delegate_stub.h8
-rw-r--r--content/plugin/webplugin_proxy.cc7
-rw-r--r--content/plugin/webplugin_proxy.h7
14 files changed, 66 insertions, 14 deletions
diff --git a/content/plugin/plugin_channel.cc b/content/plugin/plugin_channel.cc
index 0fa7a6f..7bf0858 100644
--- a/content/plugin/plugin_channel.cc
+++ b/content/plugin/plugin_channel.cc
@@ -24,6 +24,8 @@
#include "ipc/ipc_channel_posix.h"
#endif
+namespace content {
+
namespace {
void PluginReleaseCallback() {
@@ -316,3 +318,5 @@ void PluginChannel::OnClearSiteData(const std::string& site,
}
Send(new PluginHostMsg_ClearSiteDataResult(success));
}
+
+} // namespace content
diff --git a/content/plugin/plugin_channel.h b/content/plugin/plugin_channel.h
index 1e43ba0..e923a33 100644
--- a/content/plugin/plugin_channel.h
+++ b/content/plugin/plugin_channel.h
@@ -17,6 +17,8 @@ namespace base {
class WaitableEvent;
}
+namespace content {
+
// Encapsulates an IPC channel between the plugin process and one renderer
// process. On the renderer side there's a corresponding PluginChannelHost.
class PluginChannel : public NPChannelBase {
@@ -94,4 +96,6 @@ class PluginChannel : public NPChannelBase {
DISALLOW_COPY_AND_ASSIGN(PluginChannel);
};
+} // namespace content
+
#endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_H_
diff --git a/content/plugin/plugin_interpose_util_mac.mm b/content/plugin/plugin_interpose_util_mac.mm
index 670a2f2..829cfe6 100644
--- a/content/plugin/plugin_interpose_util_mac.mm
+++ b/content/plugin/plugin_interpose_util_mac.mm
@@ -11,6 +11,8 @@
#include "content/plugin/plugin_thread.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+using content::PluginThread;
+
namespace mac_plugin_interposing {
// TODO(stuartmorgan): Make this an IPC to order the plugin process above the
diff --git a/content/plugin/plugin_main.cc b/content/plugin/plugin_main.cc
index 7bef97c..a3b5b13 100644
--- a/content/plugin/plugin_main.cc
+++ b/content/plugin/plugin_main.cc
@@ -29,6 +29,8 @@
#include "ipc/ipc_descriptors.h"
#endif
+namespace content {
+
#if defined(OS_MACOSX)
// Removes our Carbon library interposing from the environment so that it
// doesn't carry into any processes that plugins might start.
@@ -42,7 +44,7 @@ void WorkaroundFlashLAHF();
#endif
// main() routine for running as the plugin process.
-int PluginMain(const content::MainFunctionParams& parameters) {
+int PluginMain(const MainFunctionParams& parameters) {
// The main thread of the plugin services UI.
#if defined(OS_MACOSX)
#if !defined(__LP64__)
@@ -80,3 +82,5 @@ int PluginMain(const content::MainFunctionParams& parameters) {
return 0;
}
+
+} // namespace content
diff --git a/content/plugin/plugin_main_linux.cc b/content/plugin/plugin_main_linux.cc
index e49d620..7566b13 100644
--- a/content/plugin/plugin_main_linux.cc
+++ b/content/plugin/plugin_main_linux.cc
@@ -13,6 +13,8 @@
// This whole file is only useful on 64-bit architectures.
#if defined(ARCH_CPU_64_BITS)
+namespace content {
+
namespace {
// Signal handler for SIGILL; see WorkaroundFlashLAHF().
@@ -67,4 +69,6 @@ void WorkaroundFlashLAHF() {
sigaction(SIGILL, &action, NULL);
}
+} // namespace content
+
#endif // defined(ARCH_CPU_64_BITS)
diff --git a/content/plugin/plugin_main_mac.mm b/content/plugin/plugin_main_mac.mm
index 7bdbb42..c8dddfd 100644
--- a/content/plugin/plugin_main_mac.mm
+++ b/content/plugin/plugin_main_mac.mm
@@ -11,6 +11,8 @@
#include "content/plugin/plugin_interpose_util_mac.h"
#include "content/public/common/content_client.h"
+namespace content {
+
#if !defined(__LP64__)
void TrimInterposeEnvironment() {
scoped_ptr<base::Environment> env(base::Environment::Create());
@@ -28,7 +30,7 @@ void TrimInterposeEnvironment() {
// 1) The whole string is "<kInterposeLibraryPath>", so just clear it, or
// 2) ":<kInterposeLibraryPath>" is the end of the string, so trim and re-set.
std::string interpose_library_path =
- content::GetContentClient()->GetCarbonInterposePath();
+ GetContentClient()->GetCarbonInterposePath();
DCHECK_GE(interpose_list.size(), interpose_library_path.size());
size_t suffix_offset = interpose_list.size() - interpose_library_path.size();
if (suffix_offset == 0 &&
@@ -49,3 +51,5 @@ void InitializeChromeApplication() {
[NSApplication sharedApplication];
mac_plugin_interposing::SetUpCocoaInterposing();
}
+
+} // namespace content
diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc
index 75a692e..0629d5a 100644
--- a/content/plugin/plugin_thread.cc
+++ b/content/plugin/plugin_thread.cc
@@ -39,6 +39,8 @@
#include "ui/base/x/x11_util.h"
#endif
+namespace content {
+
namespace {
class EnsureTerminateMessageFilter : public IPC::ChannelProxy::MessageFilter {
@@ -121,10 +123,10 @@ PluginThread::PluginThread()
plugin->set_defer_unload(true);
}
- content::GetContentClient()->plugin()->PluginProcessStarted(
+ GetContentClient()->plugin()->PluginProcessStarted(
plugin.get() ? plugin->plugin_info().name : string16());
- content::GetContentClient()->AddNPAPIPlugins(
+ GetContentClient()->AddNPAPIPlugins(
webkit::npapi::PluginList::Singleton());
// Certain plugins, such as flash, steal the unhandled exception filter
@@ -183,3 +185,5 @@ void PluginThread::OnCreateChannel(int renderer_id,
void PluginThread::OnNotifyRenderersOfPendingShutdown() {
PluginChannel::NotifyRenderersOfPendingShutdown();
}
+
+} // namespace content
diff --git a/content/plugin/plugin_thread.h b/content/plugin/plugin_thread.h
index 95903a3..a8750aa 100644
--- a/content/plugin/plugin_thread.h
+++ b/content/plugin/plugin_thread.h
@@ -16,6 +16,8 @@
#include "base/file_descriptor_posix.h"
#endif
+namespace content {
+
// The PluginThread class represents a background thread where plugin instances
// live. Communication occurs between WebPluginDelegateProxy in the renderer
// process and WebPluginDelegateStub in this thread through IPC messages.
@@ -45,4 +47,6 @@ class PluginThread : public ChildThread {
DISALLOW_COPY_AND_ASSIGN(PluginThread);
};
+} // namespace content
+
#endif // CONTENT_PLUGIN_PLUGIN_THREAD_H_
diff --git a/content/plugin/webplugin_accelerated_surface_proxy_mac.cc b/content/plugin/webplugin_accelerated_surface_proxy_mac.cc
index e891dbe..187ef14 100644
--- a/content/plugin/webplugin_accelerated_surface_proxy_mac.cc
+++ b/content/plugin/webplugin_accelerated_surface_proxy_mac.cc
@@ -14,6 +14,8 @@
#include "ui/surface/io_surface_support_mac.h"
#include "ui/surface/transport_dib.h"
+namespace content {
+
WebPluginAcceleratedSurfaceProxy* WebPluginAcceleratedSurfaceProxy::Create(
WebPluginProxy* plugin_proxy,
gfx::GpuPreference gpu_preference) {
@@ -119,3 +121,5 @@ void WebPluginAcceleratedSurfaceProxy::EndDrawing() {
window_handle_, surface_->GetSurfaceId());
}
}
+
+} // namespace content
diff --git a/content/plugin/webplugin_accelerated_surface_proxy_mac.h b/content/plugin/webplugin_accelerated_surface_proxy_mac.h
index 5d756da..028eb75 100644
--- a/content/plugin/webplugin_accelerated_surface_proxy_mac.h
+++ b/content/plugin/webplugin_accelerated_surface_proxy_mac.h
@@ -9,9 +9,11 @@
#include "ui/gl/gpu_preference.h"
#include "webkit/plugins/npapi/webplugin_accelerated_surface_mac.h"
-class WebPluginProxy;
class AcceleratedSurface;
+namespace content {
+class WebPluginProxy;
+
// Out-of-process implementation of WebPluginAcceleratedSurface that proxies
// calls through a WebPluginProxy.
class WebPluginAcceleratedSurfaceProxy
@@ -47,4 +49,6 @@ class WebPluginAcceleratedSurfaceProxy
DISALLOW_COPY_AND_ASSIGN(WebPluginAcceleratedSurfaceProxy);
};
+} // namespace content
+
#endif // CONTENT_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_
diff --git a/content/plugin/webplugin_delegate_stub.cc b/content/plugin/webplugin_delegate_stub.cc
index 1c183e6..cc76daa 100644
--- a/content/plugin/webplugin_delegate_stub.cc
+++ b/content/plugin/webplugin_delegate_stub.cc
@@ -29,6 +29,8 @@ using WebKit::WebCursorInfo;
using webkit::npapi::WebPlugin;
using webkit::npapi::WebPluginResourceClient;
+namespace content {
+
static void DestroyWebPluginAndDelegate(
base::WeakPtr<NPObjectStub> scriptable_object,
webkit::npapi::WebPluginDelegateImpl* delegate,
@@ -57,7 +59,7 @@ WebPluginDelegateStub::WebPluginDelegateStub(
WebPluginDelegateStub::~WebPluginDelegateStub() {
in_destructor_ = true;
- content::GetContentClient()->SetActiveURL(page_url_);
+ GetContentClient()->SetActiveURL(page_url_);
if (channel_->in_send()) {
// The delegate or an npobject is in the callstack, so don't delete it
@@ -73,7 +75,7 @@ WebPluginDelegateStub::~WebPluginDelegateStub() {
}
bool WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
- content::GetContentClient()->SetActiveURL(page_url_);
+ GetContentClient()->SetActiveURL(page_url_);
// A plugin can execute a script to delete itself in any of its NPP methods.
// Hold an extra reference to ourself so that if this does occur and we're
@@ -149,7 +151,7 @@ bool WebPluginDelegateStub::Send(IPC::Message* msg) {
void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params,
bool* result) {
page_url_ = params.page_url;
- content::GetContentClient()->SetActiveURL(page_url_);
+ GetContentClient()->SetActiveURL(page_url_);
*result = false;
if (params.arg_names.size() != params.arg_values.size()) {
@@ -419,3 +421,5 @@ void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle(
delegate_->set_windowed_handle(window);
}
#endif
+
+} // namespace content
diff --git a/content/plugin/webplugin_delegate_stub.h b/content/plugin/webplugin_delegate_stub.h
index 889b88b..5764c38 100644
--- a/content/plugin/webplugin_delegate_stub.h
+++ b/content/plugin/webplugin_delegate_stub.h
@@ -17,8 +17,6 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
-class PluginChannel;
-class WebPluginProxy;
struct PluginMsg_Init_Params;
struct PluginMsg_DidReceiveResponseParams;
struct PluginMsg_UpdateGeometry_Param;
@@ -34,6 +32,10 @@ class WebPluginDelegateImpl;
}
}
+namespace content {
+class PluginChannel;
+class WebPluginProxy;
+
// Converts the IPC messages from WebPluginDelegateProxy into calls to the
// actual WebPluginDelegateImpl object.
class WebPluginDelegateStub : public IPC::Listener,
@@ -134,4 +136,6 @@ class WebPluginDelegateStub : public IPC::Listener,
DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub);
};
+} // namespace content
+
#endif // CONTENT_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index 3704bc7..364deed 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -46,6 +46,7 @@ using webkit::npapi::WebPluginResourceClient;
using webkit::npapi::WebPluginAcceleratedSurface;
#endif
+namespace content {
WebPluginProxy::SharedTransportDIB::SharedTransportDIB(TransportDIB* dib)
: dib_(dib) {
@@ -141,7 +142,7 @@ void WebPluginProxy::WillDestroyWindow(gfx::PluginWindowHandle window) {
#if defined(OS_WIN)
void WebPluginProxy::SetWindowlessPumpEvent(HANDLE pump_messages_event) {
HANDLE pump_messages_event_for_renderer = NULL;
- content::BrokerDuplicateHandle(pump_messages_event, channel_->peer_pid(),
+ BrokerDuplicateHandle(pump_messages_event, channel_->peer_pid(),
&pump_messages_event_for_renderer,
SYNCHRONIZE | EVENT_MODIFY_STATE, 0);
DCHECK(pump_messages_event_for_renderer != NULL);
@@ -746,7 +747,7 @@ void WebPluginProxy::AcceleratedPluginSwappedIOSurface() {
#endif
void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) {
- content::GetContentClient()->SetActiveURL(page_url_);
+ GetContentClient()->SetActiveURL(page_url_);
Paint(damaged_rect);
Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect));
@@ -786,3 +787,5 @@ void WebPluginProxy::UpdateIMEStatus() {
Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect));
}
#endif
+
+} // namespace content
diff --git a/content/plugin/webplugin_proxy.h b/content/plugin/webplugin_proxy.h
index d8ad48f..6141f3a 100644
--- a/content/plugin/webplugin_proxy.h
+++ b/content/plugin/webplugin_proxy.h
@@ -27,8 +27,6 @@
#include "ui/surface/transport_dib.h"
#include "webkit/plugins/npapi/webplugin.h"
-class PluginChannel;
-
namespace skia {
class PlatformCanvas;
}
@@ -39,6 +37,9 @@ class WebPluginDelegateImpl;
}
}
+namespace content {
+class PluginChannel;
+
#if defined(OS_MACOSX)
class WebPluginAcceleratedSurfaceProxy;
#endif
@@ -309,4 +310,6 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
base::WeakPtrFactory<WebPluginProxy> weak_factory_;
};
+} // namespace content
+
#endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_