diff options
author | yurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-27 08:26:06 +0000 |
---|---|---|
committer | yurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-27 08:26:06 +0000 |
commit | bf7cc538f3e6f04f043fb5c56457597e2702fda7 (patch) | |
tree | 31745bc501a32190b9eedde0b9783a5395405bbb /content/worker/webworkerclient_proxy.cc | |
parent | 69b5cc1cd49d108cdb7ced431f8caf56e8d3bd43 (diff) | |
download | chromium_src-bf7cc538f3e6f04f043fb5c56457597e2702fda7.zip chromium_src-bf7cc538f3e6f04f043fb5c56457597e2702fda7.tar.gz chromium_src-bf7cc538f3e6f04f043fb5c56457597e2702fda7.tar.bz2 |
This change provides initial support for sending DevTools messages between Worker and Page processes.
On the Page side devtools messages are handled by WorkerDevtoolsAgentProxy. It implements WebWorkerBase::DevToolsDelegate interface which isolates worker stuff under content/ from DevTools specifics.
In the worker process it's WorkerDevtoolsAgent that is responsible for sending/receiving devtools messages. It implements WebWorkerStub::DevToolsDelegate and WebWorkerClientProxy::DevToolsDelegate which insulate worker stuff under content/ from the devtools implementation details.
WorkerDevtoolsAgentProxy and WorkerDevtoolsAgent are counterparts of WebWorkerProxy and WebWorkerStub. Since devtools is not a part of HTML5 the new classes live under chrome/
ContentWorkerClient is introduced for notifying embedder about certain events when worker clients can be installed.
BUG=13684
TEST=None
Review URL: http://codereview.chromium.org/6990059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/worker/webworkerclient_proxy.cc')
-rw-r--r-- | content/worker/webworkerclient_proxy.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/content/worker/webworkerclient_proxy.cc b/content/worker/webworkerclient_proxy.cc index f665de5..dde6be2 100644 --- a/content/worker/webworkerclient_proxy.cc +++ b/content/worker/webworkerclient_proxy.cc @@ -16,6 +16,7 @@ // don't support nested workers anyways. //#include "content/renderer/webworker_proxy.h" #include "content/worker/webworker_stub_base.h" +#include "content/worker/worker_devtools_agent.h" #include "content/worker/worker_thread.h" #include "content/worker/worker_webapplicationcachehost_impl.h" #include "ipc/ipc_logging.h" @@ -43,7 +44,8 @@ WebWorkerClientProxy::WebWorkerClientProxy(int route_id, : route_id_(route_id), appcache_host_id_(0), stub_(stub), - ALLOW_THIS_IN_INITIALIZER_LIST(kill_process_factory_(this)) { + ALLOW_THIS_IN_INITIALIZER_LIST(kill_process_factory_(this)), + devtools_agent_(NULL) { } WebWorkerClientProxy::~WebWorkerClientProxy() { @@ -173,6 +175,11 @@ void WebWorkerClientProxy::openFileSystem( size, create, new WebFileSystemCallbackDispatcher(callbacks)); } +void WebWorkerClientProxy::dispatchDevToolsMessage(const WebString& message) { + if (devtools_agent_) + devtools_agent_->SendDevToolsMessage(message); +} + bool WebWorkerClientProxy::Send(IPC::Message* message) { return WorkerThread::current()->Send(message); } |