Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 renderer's scale. | |
| 56 // Whenever possible, WebUI should push resources with this scale to | |
| 57 // Javascript. | |
|
Evan Stade
2012/06/14 22:03:23
reading this comment, I'd assume it returns the zo
| |
| 58 virtual float GetRendererScale() 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 Loading... | |
| 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_ |
| OLD | NEW |