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

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

Issue 2620193002: Revert of DevTools: move front-end URL handling to DevToolsUIBindingds (Closed)
Patch Set: Created 3 years, 11 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 | « chrome/browser/devtools/BUILD.gn ('k') | chrome/browser/devtools/devtools_ui_bindings.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 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 24 matching lines...) Expand all
35 // Base implementation of DevTools bindings around front-end. 35 // Base implementation of DevTools bindings around front-end.
36 class DevToolsUIBindings : public DevToolsEmbedderMessageDispatcher::Delegate, 36 class DevToolsUIBindings : public DevToolsEmbedderMessageDispatcher::Delegate,
37 public DevToolsAndroidBridge::DeviceCountListener, 37 public DevToolsAndroidBridge::DeviceCountListener,
38 public content::DevToolsAgentHostClient, 38 public content::DevToolsAgentHostClient,
39 public net::URLFetcherDelegate, 39 public net::URLFetcherDelegate,
40 public DevToolsFileHelper::Delegate { 40 public DevToolsFileHelper::Delegate {
41 public: 41 public:
42 static DevToolsUIBindings* ForWebContents( 42 static DevToolsUIBindings* ForWebContents(
43 content::WebContents* web_contents); 43 content::WebContents* web_contents);
44 44
45 static GURL SanitizeFrontendURL(const GURL& url);
46
47 class Delegate { 45 class Delegate {
48 public: 46 public:
49 virtual ~Delegate() {} 47 virtual ~Delegate() {}
50 virtual void ActivateWindow() = 0; 48 virtual void ActivateWindow() = 0;
51 virtual void CloseWindow() = 0; 49 virtual void CloseWindow() = 0;
52 virtual void Inspect(scoped_refptr<content::DevToolsAgentHost> host) = 0; 50 virtual void Inspect(scoped_refptr<content::DevToolsAgentHost> host) = 0;
53 virtual void SetInspectedPageBounds(const gfx::Rect& rect) = 0; 51 virtual void SetInspectedPageBounds(const gfx::Rect& rect) = 0;
54 virtual void InspectElementCompleted() = 0; 52 virtual void InspectElementCompleted() = 0;
55 virtual void SetIsDocked(bool is_docked) = 0; 53 virtual void SetIsDocked(bool is_docked) = 0;
56 virtual void OpenInNewTab(const std::string& url) = 0; 54 virtual void OpenInNewTab(const std::string& url) = 0;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void IndexingWorked(int request_id, 191 void IndexingWorked(int request_id,
194 const std::string& file_system_path, 192 const std::string& file_system_path,
195 int worked); 193 int worked);
196 void IndexingDone(int request_id, const std::string& file_system_path); 194 void IndexingDone(int request_id, const std::string& file_system_path);
197 void SearchCompleted(int request_id, 195 void SearchCompleted(int request_id,
198 const std::string& file_system_path, 196 const std::string& file_system_path,
199 const std::vector<std::string>& file_paths); 197 const std::vector<std::string>& file_paths);
200 typedef base::Callback<void(bool)> InfoBarCallback; 198 typedef base::Callback<void(bool)> InfoBarCallback;
201 void ShowDevToolsConfirmInfoBar(const base::string16& message, 199 void ShowDevToolsConfirmInfoBar(const base::string16& message,
202 const InfoBarCallback& callback); 200 const InfoBarCallback& callback);
203 void UpdateFrontendHost();
204 201
205 // Extensions support. 202 // Extensions support.
206 void AddDevToolsExtensionsToClient(); 203 void AddDevToolsExtensionsToClient();
207 204
208 class FrontendWebContentsObserver; 205 class FrontendWebContentsObserver;
209 std::unique_ptr<FrontendWebContentsObserver> frontend_contents_observer_; 206 std::unique_ptr<FrontendWebContentsObserver> frontend_contents_observer_;
210 207
211 Profile* profile_; 208 Profile* profile_;
212 DevToolsAndroidBridge* android_bridge_; 209 DevToolsAndroidBridge* android_bridge_;
213 content::WebContents* web_contents_; 210 content::WebContents* web_contents_;
(...skipping 18 matching lines...) Expand all
232 embedder_message_dispatcher_; 229 embedder_message_dispatcher_;
233 GURL url_; 230 GURL url_;
234 using PendingRequestsMap = std::map<const net::URLFetcher*, DispatchCallback>; 231 using PendingRequestsMap = std::map<const net::URLFetcher*, DispatchCallback>;
235 PendingRequestsMap pending_requests_; 232 PendingRequestsMap pending_requests_;
236 base::WeakPtrFactory<DevToolsUIBindings> weak_factory_; 233 base::WeakPtrFactory<DevToolsUIBindings> weak_factory_;
237 234
238 DISALLOW_COPY_AND_ASSIGN(DevToolsUIBindings); 235 DISALLOW_COPY_AND_ASSIGN(DevToolsUIBindings);
239 }; 236 };
240 237
241 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ 238 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/BUILD.gn ('k') | chrome/browser/devtools/devtools_ui_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698