| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_DEVTOOLS_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_DEVTOOLS_CLIENT_H_ |
| 6 #define CONTENT_RENDERER_DEVTOOLS_CLIENT_H_ | 6 #define CONTENT_RENDERER_DEVTOOLS_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "content/public/renderer/render_view_observer.h" | 13 #include "content/public/renderer/render_view_observer.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontendCl
ient.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontendCl
ient.h" |
| 15 | 15 |
| 16 class MessageLoop; | 16 class MessageLoop; |
| 17 class RenderViewImpl; |
| 17 | 18 |
| 18 namespace WebKit { | 19 namespace WebKit { |
| 19 class WebDevToolsFrontend; | 20 class WebDevToolsFrontend; |
| 20 class WebString; | 21 class WebString; |
| 21 } | 22 } |
| 22 | 23 |
| 23 struct DevToolsMessageData; | 24 struct DevToolsMessageData; |
| 24 | 25 |
| 25 // Developer tools UI end of communication channel between the render process of | 26 // Developer tools UI end of communication channel between the render process of |
| 26 // the page being inspected and tools UI renderer process. All messages will | 27 // the page being inspected and tools UI renderer process. All messages will |
| 27 // go through browser process. On the side of the inspected page there's | 28 // go through browser process. On the side of the inspected page there's |
| 28 // corresponding DevToolsAgent object. | 29 // corresponding DevToolsAgent object. |
| 29 // TODO(yurys): now the client is almost empty later it will delegate calls to | 30 // TODO(yurys): now the client is almost empty later it will delegate calls to |
| 30 // code in glue | 31 // code in glue |
| 31 class DevToolsClient : public content::RenderViewObserver, | 32 class DevToolsClient : public content::RenderViewObserver, |
| 32 public WebKit::WebDevToolsFrontendClient { | 33 public WebKit::WebDevToolsFrontendClient { |
| 33 public: | 34 public: |
| 34 explicit DevToolsClient(RenderView* render_view); | 35 explicit DevToolsClient(RenderViewImpl* render_view); |
| 35 virtual ~DevToolsClient(); | 36 virtual ~DevToolsClient(); |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 // RenderView::Observer implementation. | 39 // RenderView::Observer implementation. |
| 39 virtual bool OnMessageReceived(const IPC::Message& message); | 40 virtual bool OnMessageReceived(const IPC::Message& message); |
| 40 | 41 |
| 41 // WebDevToolsFrontendClient implementation | 42 // WebDevToolsFrontendClient implementation |
| 42 virtual void sendFrontendLoaded(); | 43 virtual void sendFrontendLoaded(); |
| 43 virtual void sendMessageToBackend(const WebKit::WebString&); | 44 virtual void sendMessageToBackend(const WebKit::WebString&); |
| 44 virtual void sendDebuggerCommandToAgent(const WebKit::WebString& command); | 45 virtual void sendDebuggerCommandToAgent(const WebKit::WebString& command); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 56 | 57 |
| 57 // Sends message to DevToolsAgent. | 58 // Sends message to DevToolsAgent. |
| 58 void SendToAgent(const IPC::Message& tools_agent_message); | 59 void SendToAgent(const IPC::Message& tools_agent_message); |
| 59 | 60 |
| 60 scoped_ptr<WebKit::WebDevToolsFrontend> web_tools_frontend_; | 61 scoped_ptr<WebKit::WebDevToolsFrontend> web_tools_frontend_; |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(DevToolsClient); | 63 DISALLOW_COPY_AND_ASSIGN(DevToolsClient); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 #endif // CONTENT_RENDERER_DEVTOOLS_CLIENT_H_ | 66 #endif // CONTENT_RENDERER_DEVTOOLS_CLIENT_H_ |
| OLD | NEW |