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

Side by Side Diff: content/renderer/devtools_agent.h

Issue 11630004: DevTools: rename debugger/ to devtools/, move DevTools files into content/renderer/devtools. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: For landing Created 8 years 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 unified diff | Download patch
« no previous file with comments | « content/renderer/devtools/devtools_client.cc ('k') | content/renderer/devtools_agent.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_DEVTOOLS_AGENT_H_
6 #define CONTENT_RENDERER_DEVTOOLS_AGENT_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "content/public/common/console_message_level.h"
12 #include "content/public/renderer/render_view_observer.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClien t.h"
14
15 namespace WebKit {
16 class WebDevToolsAgent;
17 }
18
19 namespace content {
20 class RenderViewImpl;
21
22 // DevToolsAgent belongs to the inspectable RenderView and provides Glue's
23 // agents with the communication capabilities. All messages from/to Glue's
24 // agents infrastructure are flowing through this communication agent.
25 // There is a corresponding DevToolsClient object on the client side.
26 class DevToolsAgent : public RenderViewObserver,
27 public WebKit::WebDevToolsAgentClient {
28 public:
29 explicit DevToolsAgent(RenderViewImpl* render_view);
30 virtual ~DevToolsAgent();
31
32 // Returns agent instance for its host id.
33 static DevToolsAgent* FromHostId(int host_id);
34
35 WebKit::WebDevToolsAgent* GetWebAgent();
36
37 bool IsAttached();
38
39 private:
40 friend class DevToolsAgentFilter;
41
42 // RenderView::Observer implementation.
43 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
44
45 // WebDevToolsAgentClient implementation
46 virtual void sendMessageToInspectorFrontend(const WebKit::WebString& data);
47
48 virtual int hostIdentifier();
49 virtual void saveAgentRuntimeState(const WebKit::WebString& state);
50 virtual WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop*
51 createClientMessageLoop();
52 virtual void clearBrowserCache();
53 virtual void clearBrowserCookies();
54 virtual void visitAllocatedObjects(AllocatedObjectVisitor* visitor);
55
56 void OnAttach();
57 void OnReattach(const std::string& agent_state);
58 void OnDetach();
59 void OnDispatchOnInspectorBackend(const std::string& message);
60 void OnInspectElement(int x, int y);
61 void OnAddMessageToConsole(ConsoleMessageLevel level,
62 const std::string& message);
63 void ContinueProgram();
64 void OnSetupDevToolsClient();
65
66 bool is_attached_;
67
68 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent);
69 };
70
71 } // namespace content
72
73 #endif // CONTENT_RENDERER_DEVTOOLS_AGENT_H_
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_client.cc ('k') | content/renderer/devtools_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698