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

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: browser test updated 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
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/devtools/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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void OnDetach(); 81 void OnDetach();
79 void OnDispatchOnInspectorBackend(int session_id, 82 void OnDispatchOnInspectorBackend(int session_id,
80 int call_id, 83 int call_id,
81 const std::string& method, 84 const std::string& method,
82 const std::string& message); 85 const std::string& message);
83 void OnInspectElement(int x, int y); 86 void OnInspectElement(int x, int y);
84 void OnRequestNewWindowACK(bool success); 87 void OnRequestNewWindowACK(bool success);
85 void ContinueProgram(); 88 void ContinueProgram();
86 void OnSetupDevToolsClient(const std::string& compatibility_script); 89 void OnSetupDevToolsClient(const std::string& compatibility_script);
87 90
91 void GotManifest(int session_id,
92 int command_id,
93 const Manifest& manifest,
94 const ManifestDebugInfo& debug_info);
95
88 bool is_attached_; 96 bool is_attached_;
89 bool is_devtools_client_; 97 bool is_devtools_client_;
90 bool paused_in_mouse_move_; 98 bool paused_in_mouse_move_;
91 bool paused_; 99 bool paused_;
92 RenderFrameImpl* frame_; 100 RenderFrameImpl* frame_;
93 base::Callback<void(int, int, const std::string&, const std::string&)> 101 base::Callback<void(int, int, const std::string&, const std::string&)>
94 send_protocol_message_callback_for_test_; 102 send_protocol_message_callback_for_test_;
95 std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_; 103 std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_;
104 base::WeakPtrFactory<DevToolsAgent> weak_factory_;
96 105
97 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); 106 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent);
98 }; 107 };
99 108
100 } // namespace content 109 } // namespace content
101 110
102 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ 111 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/devtools/devtools_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698