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

Side by Side Diff: chrome/browser/devtools/devtools_ui_bindings.h

Issue 2421913003: DevTools: allow reattaching main target live. (Closed)
Patch Set: link fixed Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 Profile* profile() { return profile_; } 69 Profile* profile() { return profile_; }
70 content::DevToolsAgentHost* agent_host() { return agent_host_.get(); } 70 content::DevToolsAgentHost* agent_host() { return agent_host_.get(); }
71 71
72 // Takes ownership over the |delegate|. 72 // Takes ownership over the |delegate|.
73 void SetDelegate(Delegate* delegate); 73 void SetDelegate(Delegate* delegate);
74 void CallClientFunction(const std::string& function_name, 74 void CallClientFunction(const std::string& function_name,
75 const base::Value* arg1, 75 const base::Value* arg1,
76 const base::Value* arg2, 76 const base::Value* arg2,
77 const base::Value* arg3); 77 const base::Value* arg3);
78 void AttachTo(const scoped_refptr<content::DevToolsAgentHost>& agent_host); 78 void AttachTo(const scoped_refptr<content::DevToolsAgentHost>& agent_host);
79 void Reattach(); 79 void Reload();
80 void Detach(); 80 void Detach();
81 bool IsAttachedTo(content::DevToolsAgentHost* agent_host); 81 bool IsAttachedTo(content::DevToolsAgentHost* agent_host);
82 82
83 private: 83 private:
84 void HandleMessageFromDevToolsFrontend(const std::string& message); 84 void HandleMessageFromDevToolsFrontend(const std::string& message);
85 85
86 // content::DevToolsAgentHostClient implementation. 86 // content::DevToolsAgentHostClient implementation.
87 void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host, 87 void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host,
88 const std::string& message) override; 88 const std::string& message) override;
89 void AgentHostClosed(content::DevToolsAgentHost* agent_host, 89 void AgentHostClosed(content::DevToolsAgentHost* agent_host,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 int sample, 138 int sample,
139 int boundary_value) override; 139 int boundary_value) override;
140 void SendJsonRequest(const DispatchCallback& callback, 140 void SendJsonRequest(const DispatchCallback& callback,
141 const std::string& browser_id, 141 const std::string& browser_id,
142 const std::string& url) override; 142 const std::string& url) override;
143 void GetPreferences(const DispatchCallback& callback) override; 143 void GetPreferences(const DispatchCallback& callback) override;
144 void SetPreference(const std::string& name, 144 void SetPreference(const std::string& name,
145 const std::string& value) override; 145 const std::string& value) override;
146 void RemovePreference(const std::string& name) override; 146 void RemovePreference(const std::string& name) override;
147 void ClearPreferences() override; 147 void ClearPreferences() override;
148 void Reattach(const DispatchCallback& callback) override;
148 void ReadyForTest() override; 149 void ReadyForTest() override;
149 150
150 // net::URLFetcherDelegate overrides. 151 // net::URLFetcherDelegate overrides.
151 void OnURLFetchComplete(const net::URLFetcher* source) override; 152 void OnURLFetchComplete(const net::URLFetcher* source) override;
152 153
153 void EnableRemoteDeviceCounter(bool enable); 154 void EnableRemoteDeviceCounter(bool enable);
154 155
155 void SendMessageAck(int request_id, 156 void SendMessageAck(int request_id,
156 const base::Value* arg1); 157 const base::Value* arg1);
157 158
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 std::unique_ptr<DevToolsFileHelper> file_helper_; 215 std::unique_ptr<DevToolsFileHelper> file_helper_;
215 scoped_refptr<DevToolsFileSystemIndexer> file_system_indexer_; 216 scoped_refptr<DevToolsFileSystemIndexer> file_system_indexer_;
216 typedef std::map< 217 typedef std::map<
217 int, 218 int,
218 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> > 219 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> >
219 IndexingJobsMap; 220 IndexingJobsMap;
220 IndexingJobsMap indexing_jobs_; 221 IndexingJobsMap indexing_jobs_;
221 222
222 bool devices_updates_enabled_; 223 bool devices_updates_enabled_;
223 bool frontend_loaded_; 224 bool frontend_loaded_;
224 bool reattaching_; 225 bool reloading_;
225 std::unique_ptr<DevToolsTargetsUIHandler> remote_targets_handler_; 226 std::unique_ptr<DevToolsTargetsUIHandler> remote_targets_handler_;
226 std::unique_ptr<PortForwardingStatusSerializer> port_status_serializer_; 227 std::unique_ptr<PortForwardingStatusSerializer> port_status_serializer_;
227 PrefChangeRegistrar pref_change_registrar_; 228 PrefChangeRegistrar pref_change_registrar_;
228 std::unique_ptr<DevToolsEmbedderMessageDispatcher> 229 std::unique_ptr<DevToolsEmbedderMessageDispatcher>
229 embedder_message_dispatcher_; 230 embedder_message_dispatcher_;
230 GURL url_; 231 GURL url_;
231 using PendingRequestsMap = std::map<const net::URLFetcher*, DispatchCallback>; 232 using PendingRequestsMap = std::map<const net::URLFetcher*, DispatchCallback>;
232 PendingRequestsMap pending_requests_; 233 PendingRequestsMap pending_requests_;
233 base::WeakPtrFactory<DevToolsUIBindings> weak_factory_; 234 base::WeakPtrFactory<DevToolsUIBindings> weak_factory_;
234 235
235 DISALLOW_COPY_AND_ASSIGN(DevToolsUIBindings); 236 DISALLOW_COPY_AND_ASSIGN(DevToolsUIBindings);
236 }; 237 };
237 238
238 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ 239 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_embedder_message_dispatcher.cc ('k') | chrome/browser/devtools/devtools_ui_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698