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

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

Issue 2858043003: [DevTools] Pass session id in detach request (Closed)
Patch Set: test compile Created 3 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/public/renderer/render_frame.h ('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 <set>
9 #include <string> 10 #include <string>
10 11
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
15 #include "content/public/renderer/render_frame_observer.h" 16 #include "content/public/renderer/render_frame_observer.h"
16 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h" 17 #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h"
17 18
18 namespace blink { 19 namespace blink {
(...skipping 27 matching lines...) Expand all
46 int session_id, 47 int session_id,
47 int call_id, 48 int call_id,
48 const std::string& message, 49 const std::string& message,
49 const std::string& post_state); 50 const std::string& post_state);
50 static blink::WebDevToolsAgentClient::WebKitClientMessageLoop* 51 static blink::WebDevToolsAgentClient::WebKitClientMessageLoop*
51 createMessageLoopWrapper(); 52 createMessageLoopWrapper();
52 53
53 blink::WebDevToolsAgent* GetWebAgent(); 54 blink::WebDevToolsAgent* GetWebAgent();
54 55
55 bool IsAttached(); 56 bool IsAttached();
57 void DetachAllSessions();
56 58
57 private: 59 private:
58 friend class DevToolsAgentTest; 60 friend class DevToolsAgentTest;
59 61
60 // RenderFrameObserver implementation. 62 // RenderFrameObserver implementation.
61 bool OnMessageReceived(const IPC::Message& message) override; 63 bool OnMessageReceived(const IPC::Message& message) override;
62 void WidgetWillClose() override; 64 void WidgetWillClose() override;
63 void OnDestruct() override; 65 void OnDestruct() override;
64 66
65 // WebDevToolsAgentClient implementation. 67 // WebDevToolsAgentClient implementation.
(...skipping 10 matching lines...) Expand all
76 78
77 void EnableTracing(const blink::WebString& category_filter) override; 79 void EnableTracing(const blink::WebString& category_filter) override;
78 void DisableTracing() override; 80 void DisableTracing() override;
79 81
80 void SetCPUThrottlingRate(double rate) override; 82 void SetCPUThrottlingRate(double rate) override;
81 83
82 void OnAttach(const std::string& host_id, int session_id); 84 void OnAttach(const std::string& host_id, int session_id);
83 void OnReattach(const std::string& host_id, 85 void OnReattach(const std::string& host_id,
84 int session_id, 86 int session_id,
85 const std::string& agent_state); 87 const std::string& agent_state);
86 void OnDetach(); 88 void OnDetach(int session_id);
87 void OnDispatchOnInspectorBackend(int session_id, 89 void OnDispatchOnInspectorBackend(int session_id,
88 int call_id, 90 int call_id,
89 const std::string& method, 91 const std::string& method,
90 const std::string& message); 92 const std::string& message);
91 void OnInspectElement(int session_id, int x, int y); 93 void OnInspectElement(int session_id, int x, int y);
92 void OnRequestNewWindowACK(bool success); 94 void OnRequestNewWindowACK(bool success);
93 void ContinueProgram(); 95 void ContinueProgram();
94 void OnSetupDevToolsClient(const std::string& compatibility_script); 96 void OnSetupDevToolsClient(const std::string& compatibility_script);
95 97
96 void GotManifest(int session_id, 98 void GotManifest(int session_id,
97 int command_id, 99 int command_id,
98 const GURL& manifest_url, 100 const GURL& manifest_url,
99 const Manifest& manifest, 101 const Manifest& manifest,
100 const ManifestDebugInfo& debug_info); 102 const ManifestDebugInfo& debug_info);
101 103
102 bool is_attached_; 104 std::set<int> session_ids_;
103 bool is_devtools_client_; 105 bool is_devtools_client_;
104 bool paused_in_mouse_move_;
105 bool paused_; 106 bool paused_;
106 RenderFrameImpl* frame_; 107 RenderFrameImpl* frame_;
107 base::Callback<void(int, int, const std::string&, const std::string&)> 108 base::Callback<void(int, int, const std::string&, const std::string&)>
108 send_protocol_message_callback_for_test_; 109 send_protocol_message_callback_for_test_;
109 std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_; 110 std::unique_ptr<DevToolsCPUThrottler> cpu_throttler_;
110 base::WeakPtrFactory<DevToolsAgent> weak_factory_; 111 base::WeakPtrFactory<DevToolsAgent> weak_factory_;
111 112
112 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent); 113 DISALLOW_COPY_AND_ASSIGN(DevToolsAgent);
113 }; 114 };
114 115
115 } // namespace content 116 } // namespace content
116 117
117 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_ 118 #endif // CONTENT_RENDERER_DEVTOOLS_DEVTOOLS_AGENT_H_
OLDNEW
« no previous file with comments | « content/public/renderer/render_frame.h ('k') | content/renderer/devtools/devtools_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698