diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 00:42:26 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 00:42:26 +0000 |
commit | d7bc57866799bd2e3577f81afbb4470f4e82d355 (patch) | |
tree | 2d8d9df2bb07da48cf7d5e65a132e131d7c660d4 | |
parent | d4515eb94ad33ac2ab9bfd1094c8e1edd1eefa1b (diff) | |
download | chromium_src-d7bc57866799bd2e3577f81afbb4470f4e82d355.zip chromium_src-d7bc57866799bd2e3577f81afbb4470f4e82d355.tar.gz chromium_src-d7bc57866799bd2e3577f81afbb4470f4e82d355.tar.bz2 |
Rename Debugger to DebuggerBridge to make the mac compiler happy.
Review URL: http://codereview.chromium.org/19487
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8936 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/debug_message_handler.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/debug_message_handler.h | 6 | ||||
-rw-r--r-- | webkit/glue/SConscript | 2 | ||||
-rw-r--r-- | webkit/glue/debugger_bridge.cc (renamed from webkit/glue/debugger.cc) | 24 | ||||
-rw-r--r-- | webkit/glue/debugger_bridge.h (renamed from webkit/glue/debugger.h) | 26 | ||||
-rw-r--r-- | webkit/glue/glue.vcproj | 4 | ||||
-rw-r--r-- | webkit/webkit.xcodeproj/project.pbxproj | 10 |
7 files changed, 43 insertions, 37 deletions
diff --git a/chrome/renderer/debug_message_handler.cc b/chrome/renderer/debug_message_handler.cc index 27c5885..78ba519 100644 --- a/chrome/renderer/debug_message_handler.cc +++ b/chrome/renderer/debug_message_handler.cc @@ -8,8 +8,10 @@ //////////////////////////////////////// // methods called from the RenderThread -DebugMessageHandler::DebugMessageHandler(RenderView* view) : - debugger_(NULL), view_(view), channel_(NULL) { +DebugMessageHandler::DebugMessageHandler(RenderView* view) + : debugger_(NULL), + view_(view), + channel_(NULL) { view_loop_ = MessageLoop::current(); view_routing_id_ = view_->routing_id(); } @@ -54,7 +56,7 @@ void DebugMessageHandler::OnBreak(bool force) { void DebugMessageHandler::OnAttach() { if (!debugger_) { - debugger_ = new Debugger(this); + debugger_ = new DebuggerBridge(this); } // Run the actual debugger attach in the renderer as it uses V8 methods which diff --git a/chrome/renderer/debug_message_handler.h b/chrome/renderer/debug_message_handler.h index 9720ef1..76abd60 100644 --- a/chrome/renderer/debug_message_handler.h +++ b/chrome/renderer/debug_message_handler.h @@ -10,12 +10,12 @@ #define CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_ #include "chrome/common/ipc_channel_proxy.h" -#include "webkit/glue/debugger.h" +#include "webkit/glue/debugger_bridge.h" class RenderView; class DebugMessageHandler : public IPC::ChannelProxy::MessageFilter, - public Debugger::Delegate { + public DebuggerBridge::Delegate { public: DebugMessageHandler(RenderView* view); virtual ~DebugMessageHandler(); @@ -49,7 +49,7 @@ class DebugMessageHandler : public IPC::ChannelProxy::MessageFilter, // the message be handled in the default way. virtual bool OnMessageReceived(const IPC::Message& message); - scoped_refptr<Debugger> debugger_; + scoped_refptr<DebuggerBridge> debugger_; // Don't ever dereference view_ directly from another thread as it's not // threadsafe, instead proxy locally via its MessageLoop. diff --git a/webkit/glue/SConscript b/webkit/glue/SConscript index df87873..025c67b 100644 --- a/webkit/glue/SConscript +++ b/webkit/glue/SConscript @@ -36,7 +36,7 @@ input_files = [ 'cpp_binding_example.cc', 'cpp_bound_class.cc', 'cpp_variant.cc', - 'debugger.cc', + 'debugger_bridge.cc', 'dom_operations.cc', 'dom_serializer.cc', 'dragclient_impl.cc', diff --git a/webkit/glue/debugger.cc b/webkit/glue/debugger_bridge.cc index 9c5dffe..bd31598 100644 --- a/webkit/glue/debugger.cc +++ b/webkit/glue/debugger_bridge.cc @@ -4,7 +4,7 @@ #include "config.h" // webkit config for V8 #include "base/string_util.h" -#include "webkit/glue/debugger.h" +#include "webkit/glue/debugger_bridge.h" #if USE(V8) #define USING_V8 @@ -13,26 +13,28 @@ void V8DebugMessageHandler(const uint16_t* message, int length, void* data) { std::wstring out(reinterpret_cast<const wchar_t*>(message), length); - reinterpret_cast<Debugger*>(data)->OutputLater(out); + reinterpret_cast<DebuggerBridge*>(data)->OutputLater(out); } -Debugger::Debugger(Delegate* del) : delegate_(del), attached_(false) { +DebuggerBridge::DebuggerBridge(Delegate* del) + : delegate_(del), + attached_(false) { delegate_loop_ = MessageLoop::current(); } -Debugger::~Debugger() { +DebuggerBridge::~DebuggerBridge() { DCHECK(!attached_); Detach(); } -void Debugger::Break(bool force) { +void DebuggerBridge::Break(bool force) { #ifdef USING_V8 DCHECK(attached_); v8::Debug::DebugBreak(); #endif } -void Debugger::Attach() { +void DebuggerBridge::Attach() { #ifdef USING_V8 if (!attached_) { attached_ = true; @@ -41,7 +43,7 @@ void Debugger::Attach() { #endif } -void Debugger::Detach() { +void DebuggerBridge::Detach() { #ifdef USING_V8 if (attached_) { attached_ = false; @@ -50,16 +52,16 @@ void Debugger::Detach() { #endif } -void Debugger::OutputLater(const std::wstring& out) { +void DebuggerBridge::OutputLater(const std::wstring& out) { delegate_loop_->PostTask(FROM_HERE, NewRunnableMethod( - this, &Debugger::Output, out)); + this, &DebuggerBridge::Output, out)); } -void Debugger::Output(const std::wstring& out) { +void DebuggerBridge::Output(const std::wstring& out) { delegate_->DebuggerOutput(out); } -void Debugger::Command(const std::wstring& cmd) { +void DebuggerBridge::Command(const std::wstring& cmd) { #ifdef USING_V8 DCHECK(attached_); v8::Debug::SendCommand(reinterpret_cast<const uint16_t*>(cmd.data()), diff --git a/webkit/glue/debugger.h b/webkit/glue/debugger_bridge.h index 3d8cefd..423641c 100644 --- a/webkit/glue/debugger.h +++ b/webkit/glue/debugger_bridge.h @@ -5,22 +5,22 @@ // 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_H -#define WEBKIT_GLUE_DEBUGGER_H +#ifndef WEBKIT_GLUE_DEBUGGER_BRIDGE_H_ +#define WEBKIT_GLUE_DEBUGGER_BRIDGE_H_ #include <string> #include "base/basictypes.h" #include "base/message_loop.h" - +#include "base/ref_counted.h" #include "v8/include/v8-debug.h" void V8DebugMessageHandler(const uint16_t* message, int length, void* data); -class Debugger : public base::RefCountedThreadSafe<Debugger> { -public: +class DebuggerBridge : public base::RefCountedThreadSafe<DebuggerBridge> { + public: class Delegate { - public: + public: virtual void DebuggerOutput(const std::wstring& data) = 0; }; // When constructed, the underlying V8 debugger is initialized and connected @@ -28,8 +28,8 @@ public: // 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 - Debugger(Debugger::Delegate* del); - virtual ~Debugger(); + DebuggerBridge(Delegate* del); + virtual ~DebuggerBridge(); // Break V8 execution. void Break(bool force); @@ -43,8 +43,9 @@ public: void Attach(); void Detach(); -private: - friend void V8DebugMessageHandler(const uint16_t* message, int length, void* data); + private: + friend void V8DebugMessageHandler(const uint16_t* message, + int length, void* data); // Called by the LocalDebugSession so that the delegate can called in the // appropriate thread. @@ -56,8 +57,7 @@ private: MessageLoop* delegate_loop_; bool attached_; - DISALLOW_EVIL_CONSTRUCTORS(Debugger); + DISALLOW_COPY_AND_ASSIGN(DebuggerBridge); }; -#endif // WEBKIT_GLUE_DEBUGGER_H - +#endif // WEBKIT_GLUE_DEBUGGER_BRIDGE_H_ diff --git a/webkit/glue/glue.vcproj b/webkit/glue/glue.vcproj index c822a90..f44284e 100644 --- a/webkit/glue/glue.vcproj +++ b/webkit/glue/glue.vcproj @@ -333,11 +333,11 @@ > </File> <File - RelativePath=".\debugger.cc" + RelativePath=".\debugger_bridge.cc" > </File> <File - RelativePath=".\debugger.h" + RelativePath=".\debugger_bridge.h" > </File> <File diff --git a/webkit/webkit.xcodeproj/project.pbxproj b/webkit/webkit.xcodeproj/project.pbxproj index cdb8011..6fa7483 100644 --- a/webkit/webkit.xcodeproj/project.pbxproj +++ b/webkit/webkit.xcodeproj/project.pbxproj @@ -1285,6 +1285,7 @@ 93EF1C0F0F214F260070601B /* PNGImageDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EF1C050F214F260070601B /* PNGImageDecoder.cpp */; }; 93EF1C100F214F260070601B /* XBMImageDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93EF1C070F214F260070601B /* XBMImageDecoder.cpp */; }; A5779DD6BC0DA17AB7DE63D4 /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 715E874BCC05E0A3DD5E5D8F /* GCController.cpp */; }; + A7CBB2A60F327C8D00360BF5 /* debugger_bridge.cc in Sources */ = {isa = PBXBuildFile; fileRef = A7CBB2A40F327C8D00360BF5 /* debugger_bridge.cc */; }; A7FBE6100F1EC18A00BB13F2 /* EditorChromium.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7FBE60F0F1EC15D00BB13F2 /* EditorChromium.cpp */; }; A7FBE6600F1FDFF900BB13F2 /* WebKitCSSMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7FBE65A0F1FDFDB00BB13F2 /* WebKitCSSMatrix.cpp */; }; B52EC24C0F2FE04A0051A2C4 /* FormControlElementWithState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B52EC24B0F2FE04A0051A2C4 /* FormControlElementWithState.cpp */; }; @@ -3910,8 +3911,6 @@ 825404FC0D92E3DA0006B936 /* cpp_variant_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpp_variant_unittest.cc; sourceTree = "<group>"; }; 825404FD0D92E3DA0006B936 /* cpp_variant.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpp_variant.cc; sourceTree = "<group>"; }; 825404FE0D92E3DA0006B936 /* cpp_variant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpp_variant.h; sourceTree = "<group>"; }; - 825404FF0D92E3DA0006B936 /* debugger.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = debugger.cc; sourceTree = "<group>"; }; - 825405000D92E3DA0006B936 /* debugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debugger.h; sourceTree = "<group>"; }; 825405040D92E3DA0006B936 /* dom_operations_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dom_operations_unittest.cc; sourceTree = "<group>"; }; 825405050D92E3DA0006B936 /* dom_operations.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dom_operations.cc; sourceTree = "<group>"; }; 825405060D92E3DA0006B936 /* dom_operations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dom_operations.h; sourceTree = "<group>"; }; @@ -4124,6 +4123,8 @@ 93EF1C080F214F260070601B /* XBMImageDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XBMImageDecoder.h; path = "image-decoders/skia/XBMImageDecoder.h"; sourceTree = "<group>"; }; 9DEAFAB44D279360C80A1BA9 /* PtrAndFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PtrAndFlags.h; sourceTree = "<group>"; }; A7218BEB0EEDF5BD000FC021 /* CSSSelectorList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSSelectorList.cpp; sourceTree = "<group>"; }; + A7CBB2A40F327C8D00360BF5 /* debugger_bridge.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = debugger_bridge.cc; sourceTree = "<group>"; }; + A7CBB2A50F327C8D00360BF5 /* debugger_bridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debugger_bridge.h; sourceTree = "<group>"; }; A7FBE60F0F1EC15D00BB13F2 /* EditorChromium.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditorChromium.cpp; path = chromium/EditorChromium.cpp; sourceTree = "<group>"; }; A7FBE65A0F1FDFDB00BB13F2 /* WebKitCSSMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSMatrix.cpp; sourceTree = "<group>"; }; A7FBE65B0F1FDFDB00BB13F2 /* WebKitCSSMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSMatrix.h; sourceTree = "<group>"; }; @@ -7533,8 +7534,8 @@ 825404FD0D92E3DA0006B936 /* cpp_variant.cc */, 825404FE0D92E3DA0006B936 /* cpp_variant.h */, 825404FC0D92E3DA0006B936 /* cpp_variant_unittest.cc */, - 825404FF0D92E3DA0006B936 /* debugger.cc */, - 825405000D92E3DA0006B936 /* debugger.h */, + A7CBB2A40F327C8D00360BF5 /* debugger_bridge.cc */, + A7CBB2A50F327C8D00360BF5 /* debugger_bridge.h */, 825405050D92E3DA0006B936 /* dom_operations.cc */, 825405060D92E3DA0006B936 /* dom_operations.h */, 825405040D92E3DA0006B936 /* dom_operations_unittest.cc */, @@ -9460,6 +9461,7 @@ E4506C170EF03AB5003BE099 /* cpp_binding_example.cc in Sources */, E45627070E268F03005E4685 /* cpp_bound_class.cc in Sources */, E45627060E268F03005E4685 /* cpp_variant.cc in Sources */, + A7CBB2A60F327C8D00360BF5 /* debugger_bridge.cc in Sources */, 53E8BE100EC36A4E00B3F8B0 /* dom_operations.cc in Sources */, E4506C0C0EF039DE003BE099 /* dom_serializer.cc in Sources */, E45626FC0E268F03005E4685 /* dragclient_impl.cc in Sources */, |