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

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

Issue 1932623003: DevTools: Introduce Page.getManifest remote debugging protocol method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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
OLDNEW
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 "content/common/content_export.h" 14 #include "content/common/content_export.h"
14 #include "content/public/renderer/render_frame_observer.h" 15 #include "content/public/renderer/render_frame_observer.h"
15 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h" 16 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.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 DevToolsCPUThrottler; 24 class DevToolsCPUThrottler;
24 class RenderFrameImpl; 25 class RenderFrameImpl;
26 struct Manifest;
27 struct ManifestDebugInfo;
25 28
26 // DevToolsAgent belongs to the inspectable RenderFrameImpl and communicates 29 // DevToolsAgent belongs to the inspectable RenderFrameImpl and communicates
27 // with WebDevToolsAgent. There is a corresponding DevToolsAgentHost 30 // with WebDevToolsAgent. There is a corresponding DevToolsAgentHost
28 // on the browser side. 31 // on the browser side.
29 class CONTENT_EXPORT DevToolsAgent 32 class CONTENT_EXPORT DevToolsAgent
30 : public RenderFrameObserver, 33 : public RenderFrameObserver,
31 NON_EXPORTED_BASE(public blink::WebDevToolsAgentClient) { 34 NON_EXPORTED_BASE(public blink::WebDevToolsAgentClient) {
32 public: 35 public:
33 explicit DevToolsAgent(RenderFrameImpl* frame); 36 explicit DevToolsAgent(RenderFrameImpl* frame);
34 ~DevToolsAgent() override; 37 ~DevToolsAgent() override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const std::string& agent_state); 80 const std::string& agent_state);
78 void OnDetach(); 81 void OnDetach();
79 void OnDispatchOnInspectorBackend(int session_id, 82 void OnDispatchOnInspectorBackend(int session_id,
80 const std::string& method, 83 const std::string& method,
81 const std::string& message); 84 const std::string& message);
82 void OnInspectElement(int x, int y); 85 void OnInspectElement(int x, int y);
83 void OnRequestNewWindowACK(bool success); 86 void OnRequestNewWindowACK(bool success);
84 void ContinueProgram(); 87 void ContinueProgram();
85 void OnSetupDevToolsClient(const std::string& compatibility_script); 88 void OnSetupDevToolsClient(const std::string& compatibility_script);
86 89
90 void GotManifest(int session_id,
91 int command_id,
92 const Manifest& manifest,
93 const ManifestDebugInfo& debug_info);
94
87 bool is_attached_; 95 bool is_attached_;
88 bool is_devtools_client_; 96 bool is_devtools_client_;
89 bool paused_in_mouse_move_; 97 bool paused_in_mouse_move_;
90 bool paused_; 98 bool paused_;
91 RenderFrameImpl* frame_; 99 RenderFrameImpl* frame_;
92 base::Callback<void(int, int, const std::string&, const std::string&)> 100 base::Callback<void(int, int, const std::string&, const std::string&)>
93 send_protocol_message_callback_for_test_; 101 send_protocol_message_callback_for_test_;
94 std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_; 102 std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_;
103 base::WeakPtrFactory<DevToolsAgent> weak_factory_;
95 104
96 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); 105 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent);
97 }; 106 };
98 107
99 } // namespace content 108 } // namespace content
100 109
101 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ 110 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698