| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/renderer/render_frame_observer.h" | 15 #include "content/public/renderer/render_frame_observer.h" |
| 16 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h" | 16 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h" |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 class WebDevToolsAgent; | 19 class WebDevToolsAgent; |
| 20 } | 20 } |
| 21 | 21 |
| 22 class GURL; |
| 23 |
| 22 namespace content { | 24 namespace content { |
| 23 | 25 |
| 24 class DevToolsCPUThrottler; | 26 class DevToolsCPUThrottler; |
| 25 class RenderFrameImpl; | 27 class RenderFrameImpl; |
| 26 struct Manifest; | 28 struct Manifest; |
| 27 struct ManifestDebugInfo; | 29 struct ManifestDebugInfo; |
| 28 | 30 |
| 29 // DevToolsAgent belongs to the inspectable RenderFrameImpl and communicates | 31 // DevToolsAgent belongs to the inspectable RenderFrameImpl and communicates |
| 30 // with WebDevToolsAgent. There is a corresponding DevToolsAgentHost | 32 // with WebDevToolsAgent. There is a corresponding DevToolsAgentHost |
| 31 // on the browser side. | 33 // on the browser side. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 int call_id, | 88 int call_id, |
| 87 const std::string& method, | 89 const std::string& method, |
| 88 const std::string& message); | 90 const std::string& message); |
| 89 void OnInspectElement(int x, int y); | 91 void OnInspectElement(int x, int y); |
| 90 void OnRequestNewWindowACK(bool success); | 92 void OnRequestNewWindowACK(bool success); |
| 91 void ContinueProgram(); | 93 void ContinueProgram(); |
| 92 void OnSetupDevToolsClient(const std::string& compatibility_script); | 94 void OnSetupDevToolsClient(const std::string& compatibility_script); |
| 93 | 95 |
| 94 void GotManifest(int session_id, | 96 void GotManifest(int session_id, |
| 95 int command_id, | 97 int command_id, |
| 98 const GURL& manifest_url, |
| 96 const Manifest& manifest, | 99 const Manifest& manifest, |
| 97 const ManifestDebugInfo& debug_info); | 100 const ManifestDebugInfo& debug_info); |
| 98 | 101 |
| 99 bool is_attached_; | 102 bool is_attached_; |
| 100 bool is_devtools_client_; | 103 bool is_devtools_client_; |
| 101 bool paused_in_mouse_move_; | 104 bool paused_in_mouse_move_; |
| 102 bool paused_; | 105 bool paused_; |
| 103 RenderFrameImpl* frame_; | 106 RenderFrameImpl* frame_; |
| 104 base::Callback<void(int, int, const std::string&, const std::string&)> | 107 base::Callback<void(int, int, const std::string&, const std::string&)> |
| 105 send_protocol_message_callback_for_test_; | 108 send_protocol_message_callback_for_test_; |
| 106 std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_; | 109 std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_; |
| 107 base::WeakPtrFactory<DevToolsAgent> weak_factory_; | 110 base::WeakPtrFactory<DevToolsAgent> weak_factory_; |
| 108 | 111 |
| 109 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); | 112 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); |
| 110 }; | 113 }; |
| 111 | 114 |
| 112 } // namespace content | 115 } // namespace content |
| 113 | 116 |
| 114 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ | 117 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ |
| OLD | NEW |