OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_DEVTOOLS_AGENT_H_ | 5 #ifndef CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ |
6 #define CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ | 6 #define CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "content/public/common/console_message_level.h" | 13 #include "content/public/common/console_message_level.h" |
14 #include "content/public/renderer/render_frame_observer.h" | 14 #include "content/public/renderer/render_frame_observer.h" |
15 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h" | 15 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h" |
| 16 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
16 | 17 |
17 namespace blink { | 18 namespace blink { |
18 class WebDevToolsAgent; | 19 class WebDevToolsAgent; |
19 } | 20 } |
20 | 21 |
21 namespace content { | 22 namespace content { |
22 | 23 |
23 class RenderViewImpl; | 24 class RenderViewImpl; |
24 | 25 |
25 // DevToolsAgent belongs to the inspectable RenderView and provides Glue's | 26 // DevToolsAgent belongs to the inspectable RenderView and provides Glue's |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void OnAttach(const std::string& host_id); | 80 void OnAttach(const std::string& host_id); |
80 void OnReattach(const std::string& host_id, | 81 void OnReattach(const std::string& host_id, |
81 const std::string& agent_state); | 82 const std::string& agent_state); |
82 void OnDetach(); | 83 void OnDetach(); |
83 void OnDispatchOnInspectorBackend(const std::string& message); | 84 void OnDispatchOnInspectorBackend(const std::string& message); |
84 void OnInspectElement(const std::string& host_id, int x, int y); | 85 void OnInspectElement(const std::string& host_id, int x, int y); |
85 void OnAddMessageToConsole(ConsoleMessageLevel level, | 86 void OnAddMessageToConsole(ConsoleMessageLevel level, |
86 const std::string& message); | 87 const std::string& message); |
87 void ContinueProgram(); | 88 void ContinueProgram(); |
88 void OnSetupDevToolsClient(); | 89 void OnSetupDevToolsClient(); |
| 90 void OnEnableDeviceEmulation(const blink::WebDeviceEmulationParams& params); |
| 91 void OnDisableDeviceEmulation(); |
89 | 92 |
90 RenderViewImpl* GetRenderViewImpl(); | 93 RenderViewImpl* GetRenderViewImpl(); |
91 | 94 |
92 static void TraceEventCallbackWrapper( | 95 static void TraceEventCallbackWrapper( |
93 base::TimeTicks timestamp, | 96 base::TimeTicks timestamp, |
94 char phase, | 97 char phase, |
95 const unsigned char* category_group_enabled, | 98 const unsigned char* category_group_enabled, |
96 const char* name, | 99 const char* name, |
97 unsigned long long id, | 100 unsigned long long id, |
98 int num_args, | 101 int num_args, |
99 const char* const arg_names[], | 102 const char* const arg_names[], |
100 const unsigned char arg_types[], | 103 const unsigned char arg_types[], |
101 const unsigned long long arg_values[], | 104 const unsigned long long arg_values[], |
102 unsigned char flags); | 105 unsigned char flags); |
103 | 106 |
104 bool is_attached_; | 107 bool is_attached_; |
105 bool is_devtools_client_; | 108 bool is_devtools_client_; |
106 bool paused_in_mouse_move_; | 109 bool paused_in_mouse_move_; |
107 RenderFrame* main_render_frame_; | 110 RenderFrame* main_render_frame_; |
108 | 111 |
109 static base::subtle::AtomicWord /* TraceEventCallback */ event_callback_; | 112 static base::subtle::AtomicWord /* TraceEventCallback */ event_callback_; |
110 | 113 |
111 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); | 114 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); |
112 }; | 115 }; |
113 | 116 |
114 } // namespace content | 117 } // namespace content |
115 | 118 |
116 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ | 119 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ |
OLD | NEW |