summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 09:45:02 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 09:45:02 +0000
commit58bfc6b074bf05e36f02a4349a6217b95f3b9c2c (patch)
tree2b2c7efa3330c70ef019a539481595e38f6f6347 /webkit
parentea36e32155bfe33d4cad2fbfeffc54edc7de1cb3 (diff)
downloadchromium_src-58bfc6b074bf05e36f02a4349a6217b95f3b9c2c.zip
chromium_src-58bfc6b074bf05e36f02a4349a6217b95f3b9c2c.tar.gz
chromium_src-58bfc6b074bf05e36f02a4349a6217b95f3b9c2c.tar.bz2
DevTools: Nuke legacy debugger.
Review URL: http://codereview.chromium.org/146027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/debugger_bridge.cc82
-rw-r--r--webkit/glue/debugger_bridge.h66
-rw-r--r--webkit/glue/inspector_client_impl.cc1
-rw-r--r--webkit/glue/webview_delegate.h2
-rw-r--r--webkit/webkit.gyp2
5 files changed, 0 insertions, 153 deletions
diff --git a/webkit/glue/debugger_bridge.cc b/webkit/glue/debugger_bridge.cc
deleted file mode 100644
index ab3c37e..0000000
--- a/webkit/glue/debugger_bridge.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2006-2008 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.
-
-#include "config.h" // webkit config for V8
-#include "base/message_loop.h"
-#include "base/string_util.h"
-#include "webkit/glue/debugger_bridge.h"
-
-#if USE(V8)
-#define USING_V8
-#include "v8/include/v8-debug.h"
-#endif
-
-void V8DebugMessageHandler(const uint16_t* message, int length,
- v8::Debug::ClientData* client_data) {
- if (!DebuggerBridge::instance_) {
- NOTREACHED();
- return;
- }
- std::wstring out(reinterpret_cast<const wchar_t*>(message), length);
- DebuggerBridge::instance_->OutputLater(out);
-}
-
-// static
-DebuggerBridge* DebuggerBridge::instance_ = NULL;
-
-DebuggerBridge::DebuggerBridge(Delegate* del)
- : delegate_(del),
- attached_(false) {
- delegate_loop_ = MessageLoop::current();
- DCHECK(instance_ == NULL);
- instance_ = this;
-}
-
-DebuggerBridge::~DebuggerBridge() {
- DCHECK(!attached_);
- instance_ = NULL;
- Detach();
-}
-
-void DebuggerBridge::Break(bool force) {
-#ifdef USING_V8
- DCHECK(attached_);
- v8::Debug::DebugBreak();
-#endif
-}
-
-void DebuggerBridge::Attach() {
-#ifdef USING_V8
- if (!attached_) {
- attached_ = true;
- v8::Debug::SetMessageHandler(V8DebugMessageHandler);
- }
-#endif
-}
-
-void DebuggerBridge::Detach() {
-#ifdef USING_V8
- if (attached_) {
- attached_ = false;
- v8::Debug::SetMessageHandler(NULL);
- }
-#endif
-}
-
-void DebuggerBridge::OutputLater(const std::wstring& out) {
- delegate_loop_->PostTask(FROM_HERE, NewRunnableMethod(
- this, &DebuggerBridge::Output, out));
-}
-
-void DebuggerBridge::Output(const std::wstring& out) {
- delegate_->DebuggerOutput(out);
-}
-
-void DebuggerBridge::Command(const std::wstring& cmd) {
-#ifdef USING_V8
- DCHECK(attached_);
- v8::Debug::SendCommand(reinterpret_cast<const uint16_t*>(cmd.data()),
- cmd.length());
-#endif
-}
diff --git a/webkit/glue/debugger_bridge.h b/webkit/glue/debugger_bridge.h
deleted file mode 100644
index 519ca21..0000000
--- a/webkit/glue/debugger_bridge.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2006-2008 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.
-
-// An interface to the V8 debugger. This is in WebKit in order to isolate
-// the renderer from a direct V8 dependency.
-
-#ifndef WEBKIT_GLUE_DEBUGGER_BRIDGE_H_
-#define WEBKIT_GLUE_DEBUGGER_BRIDGE_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/ref_counted.h"
-#include "v8/include/v8-debug.h"
-
-class MessageLoop;
-
-void V8DebugMessageHandler(const uint16_t* message, int length,
- v8::Debug::ClientData* client_data);
-
-class DebuggerBridge : public base::RefCountedThreadSafe<DebuggerBridge> {
- public:
- class Delegate {
- public:
- virtual void DebuggerOutput(const std::wstring& data) = 0;
- };
- // When constructed, the underlying V8 debugger is initialized and connected
- // to the internals of this object. The provided delegate received output
- // from the debugger. This output may be spontaneous (error messages,
- // exceptions, etc.) or the output from a command.
- // NOTE: the delegate will be called from another thread
- DebuggerBridge(Delegate* del);
- virtual ~DebuggerBridge();
-
- // Break V8 execution.
- void Break(bool force);
-
- // Sends a command to the debugger (same as v8 command-line debugger).
- // Results from the command come asynchronously.
- // TODO(erikkay): link command output to a particular command
- void Command(const std::wstring& cmd);
-
- // Attach and detach from the V8 debug message handler.
- void Attach();
- void Detach();
-
- private:
- friend void V8DebugMessageHandler(const uint16_t* message, int length,
- v8::Debug::ClientData* client_data);
-
- // Called by the LocalDebugSession so that the delegate can called in the
- // appropriate thread.
- void OutputLater(const std::wstring& cmd);
- // Calls the delegate. This method is called in the delegate's thread.
- void Output(const std::wstring& out);
-
- Delegate* delegate_;
- MessageLoop* delegate_loop_;
- bool attached_;
- static DebuggerBridge* instance_;
-
- DISALLOW_COPY_AND_ASSIGN(DebuggerBridge);
-};
-
-#endif // WEBKIT_GLUE_DEBUGGER_BRIDGE_H_
diff --git a/webkit/glue/inspector_client_impl.cc b/webkit/glue/inspector_client_impl.cc
index b7be8b5..1e9873a 100644
--- a/webkit/glue/inspector_client_impl.cc
+++ b/webkit/glue/inspector_client_impl.cc
@@ -115,7 +115,6 @@ void WebInspectorClient::showWindow() {
// Notify the webview delegate of how many resources we're inspecting.
WebViewDelegate* d = inspected_web_view_->delegate();
DCHECK(d);
- d->WebInspectorOpened(inspector->resources().size());
}
void WebInspectorClient::closeWindow() {
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index 1002d03..bd081c4 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -800,8 +800,6 @@ class WebViewDelegate : virtual public WebWidgetDelegate {
// a window.print() call.
virtual void ScriptedPrint(WebFrame* frame) { }
- virtual void WebInspectorOpened(int num_resources) { }
-
// Called when an item was added to the history
virtual void DidAddHistoryItem() { }
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index 50aafc9..688bd70 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -4495,8 +4495,6 @@
'glue/cpp_bound_class.h',
'glue/cpp_variant.cc',
'glue/cpp_variant.h',
- 'glue/debugger_bridge.cc',
- 'glue/debugger_bridge.h',
'glue/dom_operations.cc',
'glue/dom_operations.h',
'glue/dom_operations_private.h',