Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // MessageFilter object to handle messages aimed at the debugger, and to | 5 // MessageFilter object to handle messages aimed at the debugger, and to |
| 6 // dispatch them from the main thread rather than the render thread. | 6 // dispatch them from the main thread rather than the render thread. |
| 7 // Also owns the reference to the Debugger object and handles callbacks from it. | 7 // Also owns the reference to the Debugger object and handles callbacks from it. |
| 8 | 8 |
| 9 #ifndef CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_ | 9 #ifndef CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_ |
| 10 #define CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_ | 10 #define CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_ |
| 11 | 11 |
| 12 #include "chrome/common/ipc_channel_proxy.h" | 12 #include "chrome/common/ipc_channel_proxy.h" |
| 13 #include "webkit/glue/debugger.h" | 13 #include "webkit/glue/debugger.h" |
| 14 | 14 |
| 15 class RenderView; | 15 class RenderView; |
| 16 | 16 |
| 17 class DebugMessageHandler : public IPC::ChannelProxy::MessageFilter, | 17 class DebugMessageHandler : public IPC::ChannelProxy::MessageFilter, |
| 18 public Debugger::Delegate { | 18 public Debugger::Delegate { |
| 19 public: | 19 public: |
| 20 DebugMessageHandler(RenderView* view); | 20 DebugMessageHandler(RenderView* view); |
| 21 virtual ~DebugMessageHandler(); | 21 virtual ~DebugMessageHandler(); |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 // evaluate javascript URL in the renderer | 24 // Evaluate javascript URL in the renderer |
|
Erik does not do reviews
2008/11/05 17:00:13
add a period while you're at it
| |
| 25 void EvaluateScriptUrl(const std::wstring& url); | 25 void EvaluateScriptUrl(const std::wstring& url); |
| 26 | 26 |
| 27 // Attach in the renderer | |
|
Erik does not do reviews
2008/11/05 17:00:13
same here. Also, rephrase to include the thread i
| |
| 28 void Attach(); | |
| 29 | |
| 27 // Debugger::Delegate callback method to handle debugger output. | 30 // Debugger::Delegate callback method to handle debugger output. |
| 28 void DebuggerOutput(const std::wstring& out); | 31 void DebuggerOutput(const std::wstring& out); |
| 29 | 32 |
| 30 // Schedule a debugger break. | 33 // Schedule a debugger break. |
| 31 void OnBreak(bool force); | 34 void OnBreak(bool force); |
| 32 | 35 |
| 33 // Sends a command to the debugger. | 36 // Sends a command to the debugger. |
| 34 void OnCommand(const std::wstring& cmd); | 37 void OnCommand(const std::wstring& cmd); |
| 35 | 38 |
| 36 // Sends an attach event to the debugger front-end. | 39 // Sends an attach event to the debugger front-end. |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 51 // Don't ever dereference view_ directly from another thread as it's not | 54 // Don't ever dereference view_ directly from another thread as it's not |
| 52 // threadsafe, instead proxy locally via its MessageLoop. | 55 // threadsafe, instead proxy locally via its MessageLoop. |
| 53 RenderView* view_; | 56 RenderView* view_; |
| 54 MessageLoop* view_loop_; | 57 MessageLoop* view_loop_; |
| 55 | 58 |
| 56 int32 view_routing_id_; | 59 int32 view_routing_id_; |
| 57 IPC::Channel* channel_; | 60 IPC::Channel* channel_; |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 #endif // CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_ | 63 #endif // CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_ |
| OLD | NEW |