diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-21 19:52:47 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-21 19:52:47 +0000 |
commit | 91355a856f83888eab29f6a3299aa7c0fe69c3e3 (patch) | |
tree | 99ecc647ffb3988279cc768a5a00b7d5a32125ce /content/worker | |
parent | 8463d75aed2831944bfc7471ef239b0c6e31a6ca (diff) | |
download | chromium_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/worker')
-rw-r--r-- | content/worker/shared_worker_devtools_agent.cc | 4 | ||||
-rw-r--r-- | content/worker/shared_worker_devtools_agent.h | 4 | ||||
-rw-r--r-- | content/worker/websharedworker_stub.cc | 4 | ||||
-rw-r--r-- | content/worker/websharedworker_stub.h | 4 | ||||
-rw-r--r-- | content/worker/websharedworkerclient_proxy.cc | 4 | ||||
-rw-r--r-- | content/worker/websharedworkerclient_proxy.h | 4 | ||||
-rw-r--r-- | content/worker/worker_main.cc | 8 | ||||
-rw-r--r-- | content/worker/worker_thread.cc | 5 | ||||
-rw-r--r-- | content/worker/worker_thread.h | 6 | ||||
-rw-r--r-- | content/worker/worker_webapplicationcachehost_impl.cc | 4 | ||||
-rw-r--r-- | content/worker/worker_webapplicationcachehost_impl.h | 4 | ||||
-rw-r--r-- | content/worker/worker_webkitplatformsupport_impl.cc | 4 | ||||
-rw-r--r-- | content/worker/worker_webkitplatformsupport_impl.h | 9 |
13 files changed, 57 insertions, 7 deletions
diff --git a/content/worker/shared_worker_devtools_agent.cc b/content/worker/shared_worker_devtools_agent.cc index ec23350..dc4ce03 100644 --- a/content/worker/shared_worker_devtools_agent.cc +++ b/content/worker/shared_worker_devtools_agent.cc @@ -13,6 +13,8 @@ using WebKit::WebSharedWorker; using WebKit::WebString; +namespace content { + SharedWorkerDevToolsAgent::SharedWorkerDevToolsAgent( int route_id, WebSharedWorker* webworker) @@ -82,3 +84,5 @@ void SharedWorkerDevToolsAgent::OnResumeWorkerContext() { bool SharedWorkerDevToolsAgent::Send(IPC::Message* message) { return WorkerThread::current()->Send(message); } + +} // namespace content diff --git a/content/worker/shared_worker_devtools_agent.h b/content/worker/shared_worker_devtools_agent.h index 291aeb0..ad6bc7d 100644 --- a/content/worker/shared_worker_devtools_agent.h +++ b/content/worker/shared_worker_devtools_agent.h @@ -18,6 +18,8 @@ class WebSharedWorker; class WebString; } +namespace content { + class SharedWorkerDevToolsAgent { public: SharedWorkerDevToolsAgent(int route_id, WebKit::WebSharedWorker*); @@ -43,4 +45,6 @@ class SharedWorkerDevToolsAgent { DISALLOW_COPY_AND_ASSIGN(SharedWorkerDevToolsAgent); }; +} // namespace content + #endif // CONTENT_WORKER_SHARED_WORKER_DEVTOOLS_AGENT_H_ diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc index 2ff607a..8484363 100644 --- a/content/worker/websharedworker_stub.cc +++ b/content/worker/websharedworker_stub.cc @@ -16,6 +16,8 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" +namespace content { + WebSharedWorkerStub::WebSharedWorkerStub( const string16& name, int route_id, const WorkerAppCacheInitInfo& appcache_init_info) @@ -125,3 +127,5 @@ void WebSharedWorkerStub::OnTerminateWorkerContext() { EnsureWorkerContextTerminates(); started_ = false; } + +} // namespace content diff --git a/content/worker/websharedworker_stub.h b/content/worker/websharedworker_stub.h index 85c898e..bdd54f9 100644 --- a/content/worker/websharedworker_stub.h +++ b/content/worker/websharedworker_stub.h @@ -16,6 +16,8 @@ namespace WebKit { class WebSharedWorker; } +namespace content { + class SharedWorkerDevToolsAgent; // This class creates a WebSharedWorker, and translates incoming IPCs to the @@ -77,4 +79,6 @@ class WebSharedWorkerStub : public IPC::Listener { DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub); }; +} // namespace content + #endif // CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ diff --git a/content/worker/websharedworkerclient_proxy.cc b/content/worker/websharedworkerclient_proxy.cc index 21cd69b..ee29b8e 100644 --- a/content/worker/websharedworkerclient_proxy.cc +++ b/content/worker/websharedworkerclient_proxy.cc @@ -33,6 +33,8 @@ using WebKit::WebString; using WebKit::WebWorker; using WebKit::WebSharedWorkerClient; +namespace content { + // How long to wait for worker to finish after it's been told to terminate. #define kMaxTimeForRunawayWorkerSeconds 3 @@ -202,3 +204,5 @@ void WebSharedWorkerClientProxy::EnsureWorkerContextTerminates() { weak_factory_.GetWeakPtr()), base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds)); } + +} // namespace content diff --git a/content/worker/websharedworkerclient_proxy.h b/content/worker/websharedworkerclient_proxy.h index 7fd3a1ce..75cd6a8 100644 --- a/content/worker/websharedworkerclient_proxy.h +++ b/content/worker/websharedworkerclient_proxy.h @@ -17,6 +17,8 @@ class WebApplicationCacheHostClient; class WebFrame; } +namespace content { + class SharedWorkerDevToolsAgent; class WebSharedWorkerStub; @@ -98,4 +100,6 @@ class WebSharedWorkerClientProxy : public WebKit::WebSharedWorkerClient { DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerClientProxy); }; +} // namespace content + #endif // CONTENT_WORKER_WEBWORKERCLIENT_PROXY_H_ diff --git a/content/worker/worker_main.cc b/content/worker/worker_main.cc index ff6a820..cc401cb 100644 --- a/content/worker/worker_main.cc +++ b/content/worker/worker_main.cc @@ -18,8 +18,10 @@ #include "sandbox/win/src/sandbox.h" #endif +namespace content { + // Mainline routine for running as the worker process. -int WorkerMain(const content::MainFunctionParams& parameters) { +int WorkerMain(const MainFunctionParams& parameters) { // The main message loop of the worker process. MessageLoop main_message_loop; base::PlatformThread::SetName("CrWorkerMain"); @@ -46,7 +48,7 @@ int WorkerMain(const content::MainFunctionParams& parameters) { #endif #if defined(OS_LINUX) - content::InitializeSandbox(); + InitializeSandbox(); #endif const CommandLine& parsed_command_line = parameters.command_line; @@ -60,3 +62,5 @@ int WorkerMain(const content::MainFunctionParams& parameters) { return 0; } + +} // namespace content diff --git a/content/worker/worker_thread.cc b/content/worker/worker_thread.cc index 4ef866a..3dd90fbb 100644 --- a/content/worker/worker_thread.cc +++ b/content/worker/worker_thread.cc @@ -24,10 +24,11 @@ using WebKit::WebRuntimeFeatures; +namespace content { + static base::LazyInstance<base::ThreadLocalPointer<WorkerThread> > lazy_tls = LAZY_INSTANCE_INITIALIZER; - WorkerThread::WorkerThread() { lazy_tls.Pointer()->Set(this); webkit_platform_support_.reset(new WorkerWebKitPlatformSupportImpl); @@ -126,3 +127,5 @@ void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { worker_stubs_.insert(stub); } + +} // namespace content diff --git a/content/worker/worker_thread.h b/content/worker/worker_thread.h index 440d6c5..4c10ab0 100644 --- a/content/worker/worker_thread.h +++ b/content/worker/worker_thread.h @@ -13,8 +13,10 @@ class AppCacheDispatcher; class DBMessageFilter; class IndexedDBMessageFilter; class WebDatabaseObserverImpl; -class WebSharedWorkerStub; struct WorkerProcessMsg_CreateWorker_Params; + +namespace content { +class WebSharedWorkerStub; class WorkerWebKitPlatformSupportImpl; class WorkerThread : public ChildThread { @@ -51,4 +53,6 @@ class WorkerThread : public ChildThread { DISALLOW_COPY_AND_ASSIGN(WorkerThread); }; +} // namespace content + #endif // CONTENT_WORKER_WORKER_THREAD_H_ diff --git a/content/worker/worker_webapplicationcachehost_impl.cc b/content/worker/worker_webapplicationcachehost_impl.cc index 0ed16e5..af7820b 100644 --- a/content/worker/worker_webapplicationcachehost_impl.cc +++ b/content/worker/worker_webapplicationcachehost_impl.cc @@ -7,6 +7,8 @@ #include "content/common/appcache/appcache_dispatcher.h" #include "content/worker/worker_thread.h" +namespace content { + WorkerWebApplicationCacheHostImpl::WorkerWebApplicationCacheHostImpl( const WorkerAppCacheInitInfo& init_info, WebKit::WebApplicationCacheHostClient* client) @@ -39,3 +41,5 @@ bool WorkerWebApplicationCacheHostImpl::selectCacheWithManifest( const WebKit::WebURL&) { return true; } + +} // namespace content diff --git a/content/worker/worker_webapplicationcachehost_impl.h b/content/worker/worker_webapplicationcachehost_impl.h index 8c70ced..9f9baa2 100644 --- a/content/worker/worker_webapplicationcachehost_impl.h +++ b/content/worker/worker_webapplicationcachehost_impl.h @@ -7,6 +7,8 @@ #include "webkit/appcache/web_application_cache_host_impl.h" +namespace content { + // Information used to construct and initialize an appcache host // for a worker. struct WorkerAppCacheInitInfo { @@ -48,4 +50,6 @@ class WorkerWebApplicationCacheHostImpl virtual bool selectCacheWithManifest(const WebKit::WebURL& manifestURL); }; +} // namespace content + #endif // CHROME_WORKER_WORKER_WEBAPPLICATIONCACHEHOST_IMPL_H_ diff --git a/content/worker/worker_webkitplatformsupport_impl.cc b/content/worker/worker_webkitplatformsupport_impl.cc index bebcd67..c88bbb0 100644 --- a/content/worker/worker_webkitplatformsupport_impl.cc +++ b/content/worker/worker_webkitplatformsupport_impl.cc @@ -38,6 +38,8 @@ using WebKit::WebStorageNamespace; using WebKit::WebString; using WebKit::WebURL; +namespace content { + // TODO(kinuko): Probably this could be consolidated into // RendererWebKitPlatformSupportImpl::FileUtilities. class WorkerWebKitPlatformSupportImpl::FileUtilities @@ -284,3 +286,5 @@ WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { blob_registry_.reset(new WebBlobRegistryImpl(WorkerThread::current())); return blob_registry_.get(); } + +} // namespace content diff --git a/content/worker/worker_webkitplatformsupport_impl.h b/content/worker/worker_webkitplatformsupport_impl.h index 560f18c..7b29313 100644 --- a/content/worker/worker_webkitplatformsupport_impl.h +++ b/content/worker/worker_webkitplatformsupport_impl.h @@ -15,9 +15,10 @@ namespace WebKit { class WebFileUtilities; } -class WorkerWebKitPlatformSupportImpl - : public content::WebKitPlatformSupportImpl, - public WebKit::WebMimeRegistry { +namespace content { + +class WorkerWebKitPlatformSupportImpl : public WebKitPlatformSupportImpl, + public WebKit::WebMimeRegistry { public: WorkerWebKitPlatformSupportImpl(); virtual ~WorkerWebKitPlatformSupportImpl(); @@ -98,4 +99,6 @@ class WorkerWebKitPlatformSupportImpl scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; }; +} // namespace content + #endif // CONTENT_WORKER_WORKER_WEBKITPLATFORMSUPPORT_IMPL_H_ |