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

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

Issue 221283009: [DevTools] Pass inspected page bounds from frontend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test on mac Created 6 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 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 static DevToolsUIBindings* GetOrCreateFor( 41 static DevToolsUIBindings* GetOrCreateFor(
42 content::WebContents* web_contents); 42 content::WebContents* web_contents);
43 static GURL ApplyThemeToURL(Profile* profile, const GURL& base_url); 43 static GURL ApplyThemeToURL(Profile* profile, const GURL& base_url);
44 44
45 class Delegate { 45 class Delegate {
46 public: 46 public:
47 virtual ~Delegate() {} 47 virtual ~Delegate() {}
48 virtual void ActivateWindow() = 0; 48 virtual void ActivateWindow() = 0;
49 virtual void CloseWindow() = 0; 49 virtual void CloseWindow() = 0;
50 virtual void SetContentsInsets( 50 virtual void SetInspectedPageBounds(const gfx::Rect& rect) = 0;
51 int left, int top, int right, int bottom) = 0;
52 virtual void SetContentsResizingStrategy( 51 virtual void SetContentsResizingStrategy(
53 const gfx::Insets& insets, const gfx::Size& min_size) = 0; 52 const gfx::Insets& insets, const gfx::Size& min_size) = 0;
54 virtual void InspectElementCompleted() = 0; 53 virtual void InspectElementCompleted() = 0;
55 virtual void MoveWindow(int x, int y) = 0; 54 virtual void MoveWindow(int x, int y) = 0;
56 virtual void SetIsDocked(bool is_docked) = 0; 55 virtual void SetIsDocked(bool is_docked) = 0;
57 virtual void OpenInNewTab(const std::string& url) = 0; 56 virtual void OpenInNewTab(const std::string& url) = 0;
58 virtual void SetWhitelistedShortcuts(const std::string& message) = 0; 57 virtual void SetWhitelistedShortcuts(const std::string& message) = 0;
59 58
60 virtual void InspectedContentsClosing() = 0; 59 virtual void InspectedContentsClosing() = 0;
61 virtual void OnLoadCompleted() = 0; 60 virtual void OnLoadCompleted() = 0;
(...skipping 22 matching lines...) Expand all
84 const content::NotificationSource& source, 83 const content::NotificationSource& source,
85 const content::NotificationDetails& details) OVERRIDE; 84 const content::NotificationDetails& details) OVERRIDE;
86 85
87 // content::DevToolsFrontendHostDelegate override: 86 // content::DevToolsFrontendHostDelegate override:
88 virtual void InspectedContentsClosing() OVERRIDE; 87 virtual void InspectedContentsClosing() OVERRIDE;
89 virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE; 88 virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE;
90 89
91 // DevToolsEmbedderMessageDispatcher::Delegate overrides: 90 // DevToolsEmbedderMessageDispatcher::Delegate overrides:
92 virtual void ActivateWindow() OVERRIDE; 91 virtual void ActivateWindow() OVERRIDE;
93 virtual void CloseWindow() OVERRIDE; 92 virtual void CloseWindow() OVERRIDE;
94 virtual void SetContentsInsets( 93 virtual void SetInspectedPageBounds(const gfx::Rect& rect) OVERRIDE;
95 int left, int top, int right, int bottom) OVERRIDE;
96 virtual void SetContentsResizingStrategy( 94 virtual void SetContentsResizingStrategy(
97 const gfx::Insets& insets, const gfx::Size& min_size) OVERRIDE; 95 const gfx::Insets& insets, const gfx::Size& min_size) OVERRIDE;
98 virtual void InspectElementCompleted() OVERRIDE; 96 virtual void InspectElementCompleted() OVERRIDE;
99 virtual void InspectedURLChanged(const std::string& url) OVERRIDE; 97 virtual void InspectedURLChanged(const std::string& url) OVERRIDE;
100 virtual void MoveWindow(int x, int y) OVERRIDE; 98 virtual void MoveWindow(int x, int y) OVERRIDE;
101 virtual void SetIsDocked(bool is_docked) OVERRIDE; 99 virtual void SetIsDocked(bool is_docked) OVERRIDE;
102 virtual void OpenInNewTab(const std::string& url) OVERRIDE; 100 virtual void OpenInNewTab(const std::string& url) OVERRIDE;
103 virtual void SaveToFile(const std::string& url, 101 virtual void SaveToFile(const std::string& url,
104 const std::string& content, 102 const std::string& content,
105 bool save_as) OVERRIDE; 103 bool save_as) OVERRIDE;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 typedef std::set<std::string> Subscribers; 180 typedef std::set<std::string> Subscribers;
183 Subscribers subscribers_; 181 Subscribers subscribers_;
184 scoped_ptr<DevToolsTargetsUIHandler> remote_targets_handler_; 182 scoped_ptr<DevToolsTargetsUIHandler> remote_targets_handler_;
185 scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_; 183 scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_;
186 base::WeakPtrFactory<DevToolsUIBindings> weak_factory_; 184 base::WeakPtrFactory<DevToolsUIBindings> weak_factory_;
187 185
188 DISALLOW_COPY_AND_ASSIGN(DevToolsUIBindings); 186 DISALLOW_COPY_AND_ASSIGN(DevToolsUIBindings);
189 }; 187 };
190 188
191 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_UI_BINDINGS_H_ 189 #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