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

Side by Side Diff: content/public/browser/web_ui.h

Issue 10535134: Add WebUI::GetDeviceScale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/webui/web_ui_impl.cc ('k') | no next file » | 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_PUBLIC_BROWSER_WEB_UI_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_UI_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const std::string& function_name, 45 const std::string& function_name,
46 const std::vector<const base::Value*>& arg_list); 46 const std::vector<const base::Value*>& arg_list);
47 47
48 virtual ~WebUI() {} 48 virtual ~WebUI() {}
49 49
50 virtual WebContents* GetWebContents() const = 0; 50 virtual WebContents* GetWebContents() const = 0;
51 51
52 virtual WebUIController* GetController() const = 0; 52 virtual WebUIController* GetController() const = 0;
53 virtual void SetController(WebUIController* controller) = 0; 53 virtual void SetController(WebUIController* controller) = 0;
54 54
55 // Returns the device scale of the monitor that the renderer is on.
56 // Whenever possible, WebUI should push resources with this scale to
57 // Javascript.
58 virtual float GetDeviceScale() const = 0;
59
55 // Returns true if the favicon should be hidden for the current tab. 60 // Returns true if the favicon should be hidden for the current tab.
56 virtual bool ShouldHideFavicon() const = 0; 61 virtual bool ShouldHideFavicon() const = 0;
57 virtual void HideFavicon() = 0; 62 virtual void HideFavicon() = 0;
58 63
59 // Returns true if the location bar should be focused by default rather than 64 // Returns true if the location bar should be focused by default rather than
60 // the page contents. Some pages will want to use this to encourage the user 65 // the page contents. Some pages will want to use this to encourage the user
61 // to type in the URL bar. 66 // to type in the URL bar.
62 virtual bool ShouldFocusLocationBarByDefault() const = 0; 67 virtual bool ShouldFocusLocationBarByDefault() const = 0;
63 virtual void FocusLocationBarByDefault() = 0; 68 virtual void FocusLocationBarByDefault() = 0;
64 69
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const base::Value& arg3, 129 const base::Value& arg3,
125 const base::Value& arg4) = 0; 130 const base::Value& arg4) = 0;
126 virtual void CallJavascriptFunction( 131 virtual void CallJavascriptFunction(
127 const std::string& function_name, 132 const std::string& function_name,
128 const std::vector<const base::Value*>& args) = 0; 133 const std::vector<const base::Value*>& args) = 0;
129 }; 134 };
130 135
131 } // namespace content 136 } // namespace content
132 137
133 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_ 138 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698