Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: chrome/browser/debugger/debugger_remote_service.h

Issue 8635005: DevTools: remove support for legacy remote debugger (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests compilation Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/debugger/debugger_remote_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/debugger_remote_service.h
diff --git a/chrome/browser/debugger/debugger_remote_service.h b/chrome/browser/debugger/debugger_remote_service.h
deleted file mode 100644
index 7635117206c8064e783db82cc2a9ff135d7f3fac..0000000000000000000000000000000000000000
--- a/chrome/browser/debugger/debugger_remote_service.h
+++ /dev/null
@@ -1,127 +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.
-
-// This file declares the DebuggerRemoteServiceCommand struct and the
-// DebuggerRemoteService class which handles commands directed to the
-// "V8Debugger" tool.
-#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_REMOTE_SERVICE_H_
-#define CHROME_BROWSER_DEBUGGER_DEBUGGER_REMOTE_SERVICE_H_
-#pragma once
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "chrome/browser/debugger/devtools_remote.h"
-
-class DevToolsProtocolHandler;
-class DevToolsRemoteMessage;
-class TabContents;
-
-namespace base {
-class DictionaryValue;
-class Value;
-}
-
-// Contains constants for DebuggerRemoteService tool protocol commands
-// (V8-related only).
-struct DebuggerRemoteServiceCommand {
- static const char kAttach[];
- static const char kDetach[];
- static const char kDebuggerCommand[];
- static const char kEvaluateJavascript[];
- static const char kFrameNavigate[]; // navigation event
- static const char kTabClosed[]; // tab closing event
-};
-
-// Handles V8 debugger-related messages from the remote debugger (like
-// attach to V8 debugger, detach from V8 debugger, send command to V8 debugger)
-// and proxies JSON messages from V8 debugger to the remote debugger.
-class DebuggerRemoteService : public DevToolsRemoteListener {
- public:
- // |delegate| (never NULL) is the protocol handler instance
- // which dispatches messages to this service. The responses from the
- // V8 VM debugger are routed back to |delegate|.
- // The ownership of |delegate| is NOT transferred to this class.
- explicit DebuggerRemoteService(DevToolsProtocolHandler* delegate);
-
- // Handles a JSON message from the tab_uid-associated V8 debugger.
- void DebuggerOutput(int32 tab_uid, const std::string& message);
-
- // Handles a frame navigation event.
- void FrameNavigate(int32 tab_uid, const std::string& url);
-
- // Handles a tab closing event.
- void TabClosed(int32 tab_uid);
-
- // Detaches the remote debugger from the tab specified by |destination|.
- // It is public so that we can detach from the tab on the remote debugger
- // connection loss.
- // If |response| is not NULL, the operation result will be written
- // as the "result" field in |response|, otherwise the result
- // will not be propagated back to the caller.
- void DetachFromTab(const std::string& destination,
- base::DictionaryValue* response);
-
- // DevToolsRemoteListener interface.
-
- // Processes |message| from the remote debugger, where the tool is
- // "V8Debugger". Either sends the reply immediately or waits for an
- // asynchronous response from the V8 debugger.
- virtual void HandleMessage(const DevToolsRemoteMessage& message) OVERRIDE;
-
- // Gets invoked on the remote debugger [socket] connection loss.
- // Notifies the InspectableTabProxy of the remote debugger detachment.
- virtual void OnConnectionLost() OVERRIDE;
-
- // Specifies a tool name ("V8Debugger") handled by this class.
- static const char kToolName[];
-
- private:
- // Operation result returned in the "result" field.
- typedef enum {
- RESULT_OK = 0,
- RESULT_ILLEGAL_TAB_STATE,
- RESULT_UNKNOWN_TAB,
- RESULT_DEBUGGER_ERROR,
- RESULT_UNKNOWN_COMMAND
- } Result;
-
- virtual ~DebuggerRemoteService();
-
- // Attaches a remote debugger to the tab specified by |destination|.
- // Writes the attachment result (one of Result enum values) into |response|.
- void AttachToTab(const std::string& destination,
- base::DictionaryValue* response);
-
- // Retrieves a WebContents instance for the specified |tab_uid|
- // or NULL if no such tab is found or no WebContents instance
- // corresponds to that tab.
- TabContents* ToTabContents(int32 tab_uid);
-
- // Sends a JSON message with the |response| to the remote debugger.
- // |tool| and |destination| are used as the respective header values.
- void SendResponse(const base::Value& response,
- const std::string& tool,
- const std::string& destination);
-
- // Redirects a V8 debugger command from |content| to a V8 debugger associated
- // with the |tab_uid| and writes the result into |response| if it becomes
- // known immediately.
- bool DispatchDebuggerCommand(int tab_uid,
- base::DictionaryValue* content,
- base::DictionaryValue* response);
-
- // Redirects a Javascript evaluation command from |content| to
- // a V8 debugger associated with the |tab_uid| and writes the result
- // into |response| if it becomes known immediately.
- bool DispatchEvaluateJavascript(int tab_uid,
- base::DictionaryValue* content,
- base::DictionaryValue* response);
-
- // The delegate is used to get an InspectableTabProxy instance.
- DevToolsProtocolHandler* delegate_;
- DISALLOW_COPY_AND_ASSIGN(DebuggerRemoteService);
-};
-
-#endif // CHROME_BROWSER_DEBUGGER_DEBUGGER_REMOTE_SERVICE_H_
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/debugger/debugger_remote_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698