summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authoryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 08:26:06 +0000
committeryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 08:26:06 +0000
commitbf7cc538f3e6f04f043fb5c56457597e2702fda7 (patch)
tree31745bc501a32190b9eedde0b9783a5395405bbb /chrome/common
parent69b5cc1cd49d108cdb7ced431f8caf56e8d3bd43 (diff)
downloadchromium_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 'chrome/common')
-rw-r--r--chrome/common/common_message_generator.h1
-rw-r--r--chrome/common/devtools_messages.h142
-rw-r--r--chrome/common/logging_chrome.cc2
3 files changed, 1 insertions, 144 deletions
diff --git a/chrome/common/common_message_generator.h b/chrome/common/common_message_generator.h
index 5597abd..52b8ec2 100644
--- a/chrome/common/common_message_generator.h
+++ b/chrome/common/common_message_generator.h
@@ -5,7 +5,6 @@
// Multiply-included file, hence no include guard.
#include "chrome/common/autofill_messages.h"
-#include "chrome/common/devtools_messages.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/icon_messages.h"
#include "chrome/common/print_messages.h"
diff --git a/chrome/common/devtools_messages.h b/chrome/common/devtools_messages.h
deleted file mode 100644
index e3275766..0000000
--- a/chrome/common/devtools_messages.h
+++ /dev/null
@@ -1,142 +0,0 @@
-// 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.
-
-// Developer tools consist of the following parts:
-//
-// DevToolsAgent lives in the renderer of an inspected page and provides access
-// to the pages resources, DOM, v8 etc. by means of IPC messages.
-//
-// DevToolsClient is a thin delegate that lives in the tools front-end
-// renderer and converts IPC messages to frontend method calls and allows the
-// frontend to send messages to the DevToolsAgent.
-//
-// All the messages are routed through browser process. There is a
-// DevToolsManager living in the browser process that is responsible for
-// routing logistics. It is also capable of sending direct messages to the
-// agent rather than forwarding messages between agents and clients only.
-//
-// Chain of communication between the components may be described by the
-// following diagram:
-// ----------------------------
-// | (tools frontend |
-// | renderer process) |
-// | | --------------------
-// |tools <--> DevToolsClient+<-- IPC -->+ (browser process) |
-// |frontend | | |
-// ---------------------------- ---------+----------
-// ^
-// |
-// IPC
-// |
-// v
-// --------------------------+--------
-// | inspected page <--> DevToolsAgent |
-// | |
-// | (inspected page renderer process) |
-// -----------------------------------
-//
-// This file describes developer tools message types.
-
-// Multiply-included message file, no standard include guard.
-#include <map>
-#include <string>
-
-#include "ipc/ipc_message_macros.h"
-
-// Singly-included section.
-#ifndef CHROME_COMMON_DEVTOOLS_MESSAGES_H_
-#define CHROME_COMMON_DEVTOOLS_MESSAGES_H_
-
-typedef std::map<std::string, std::string> DevToolsRuntimeProperties;
-
-#endif // CHROME_COMMON_DEVTOOLS_MESSAGES_H_
-
-#define IPC_MESSAGE_START DevToolsMsgStart
-
-// These are messages sent from DevToolsAgent to DevToolsClient through the
-// browser.
-// WebKit-level transport.
-IPC_MESSAGE_CONTROL1(DevToolsClientMsg_DispatchOnInspectorFrontend,
- std::string /* message */)
-
-// Legacy debugger output message.
-IPC_MESSAGE_CONTROL1(DevToolsClientMsg_DebuggerOutput,
- std::string /* message */)
-
-
-//-----------------------------------------------------------------------------
-// These are messages sent from DevToolsClient to DevToolsAgent through the
-// browser.
-// Tells agent that there is a client host connected to it.
-IPC_MESSAGE_CONTROL1(DevToolsAgentMsg_Attach,
- DevToolsRuntimeProperties /* properties */)
-
-// Tells agent that there is no longer a client host connected to it.
-IPC_MESSAGE_CONTROL0(DevToolsAgentMsg_Detach)
-
-// Tells agent that the front-end has been loaded
-IPC_MESSAGE_CONTROL0(DevToolsAgentMsg_FrontendLoaded)
-
-// WebKit-level transport.
-IPC_MESSAGE_CONTROL1(DevToolsAgentMsg_DispatchOnInspectorBackend,
- std::string /* message */)
-
-// Send debugger command to the debugger agent. Debugger commands should
-// be handled on IO thread(while all other devtools messages are handled in
-// the render thread) to allow executing the commands when v8 is on a
-// breakpoint.
-IPC_MESSAGE_CONTROL1(DevToolsAgentMsg_DebuggerCommand,
- std::string /* command */)
-
-// Inspect element with the given coordinates.
-IPC_MESSAGE_CONTROL2(DevToolsAgentMsg_InspectElement,
- int /* x */,
- int /* y */)
-
-
-//-----------------------------------------------------------------------------
-// These are messages sent from the browser to the renderer.
-
-// RenderViewHostDelegate::RenderViewCreated method sends this message to a
-// new renderer to notify it that it will host developer tools UI and should
-// set up all neccessary bindings and create DevToolsClient instance that
-// will handle communication with inspected page DevToolsAgent.
-IPC_MESSAGE_ROUTED0(DevToolsMsg_SetupDevToolsClient)
-
-
-//-----------------------------------------------------------------------------
-// These are messages sent from the renderer to the browser.
-
-// Wraps an IPC message that's destined to the DevToolsClient on
-// DevToolsAgent->browser hop.
-IPC_MESSAGE_ROUTED1(DevToolsHostMsg_ForwardToClient,
- IPC::Message /* one of DevToolsClientMsg_XXX types */)
-
-// Wraps an IPC message that's destined to the DevToolsAgent on
-// DevToolsClient->browser hop.
-IPC_MESSAGE_ROUTED1(DevToolsHostMsg_ForwardToAgent,
- IPC::Message /* one of DevToolsAgentMsg_XXX types */)
-
-// Activates (brings to the front) corresponding dev tools window.
-IPC_MESSAGE_ROUTED0(DevToolsHostMsg_ActivateWindow)
-
-// Closes dev tools window that is inspecting current render_view_host.
-IPC_MESSAGE_ROUTED0(DevToolsHostMsg_CloseWindow)
-
-// Attaches dev tools window that is inspecting current render_view_host.
-IPC_MESSAGE_ROUTED0(DevToolsHostMsg_RequestDockWindow)
-
-// Detaches dev tools window that is inspecting current render_view_host.
-IPC_MESSAGE_ROUTED0(DevToolsHostMsg_RequestUndockWindow)
-
-// Shows Save As dialog for content.
-IPC_MESSAGE_ROUTED2(DevToolsHostMsg_SaveAs,
- std::string /* file_name */,
- std::string /* content */)
-
-// Updates runtime features store in devtools manager in order to support
-// cross-navigation instrumentation.
-IPC_MESSAGE_ROUTED2(DevToolsHostMsg_RuntimePropertyChanged,
- std::string /* name */,
- std::string /* value */)
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 7f5c6a6..2c27809 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -16,8 +16,8 @@
// IPC_MESSAGE_MACROS_LOG_ENABLED doesn't get undefined.
#if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED)
#define IPC_MESSAGE_MACROS_LOG_ENABLED
-#include "chrome/common/devtools_messages.h"
#include "chrome/common/render_messages.h"
+#include "content/common/devtools_messages.h"
#include "content/common/plugin_messages.h"
#include "content/common/worker_messages.h"
#endif