| 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // 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 |
| 66 // to type in the URL bar. | 66 // to type in the URL bar. |
| 67 virtual bool ShouldFocusLocationBarByDefault() const = 0; | 67 virtual bool ShouldFocusLocationBarByDefault() const = 0; |
| 68 virtual void FocusLocationBarByDefault() = 0; | 68 virtual void FocusLocationBarByDefault() = 0; |
| 69 | 69 |
| 70 // Returns true if the page's URL should be hidden. Some Web UI pages | 70 // Returns true if the page's URL should be hidden. Some Web UI pages |
| 71 // like the new tab page will want to hide it. | 71 // like the new tab page will want to hide it. |
| 72 virtual bool ShouldHideURL() const = 0; | 72 virtual bool ShouldHideURL() const = 0; |
| 73 virtual void HideURL() = 0; | 73 virtual void HideURL() = 0; |
| 74 | 74 |
| 75 // Returns true if the pages URL host should not be emphasized. |
| 76 virtual bool ShouldNotEmphasizeHost() const = 0; |
| 77 virtual void DontEmphasizeHost() = 0; |
| 78 |
| 75 // Gets a custom tab title provided by the Web UI. If there is no title | 79 // Gets a custom tab title provided by the Web UI. If there is no title |
| 76 // override, the string will be empty which should trigger the default title | 80 // override, the string will be empty which should trigger the default title |
| 77 // behavior for the tab. | 81 // behavior for the tab. |
| 78 virtual const string16& GetOverriddenTitle() const = 0; | 82 virtual const string16& GetOverriddenTitle() const = 0; |
| 79 virtual void OverrideTitle(const string16& title) = 0; | 83 virtual void OverrideTitle(const string16& title) = 0; |
| 80 | 84 |
| 81 // Returns the transition type that should be used for link clicks on this | 85 // Returns the transition type that should be used for link clicks on this |
| 82 // Web UI. This will default to LINK but may be overridden. | 86 // Web UI. This will default to LINK but may be overridden. |
| 83 virtual PageTransition GetLinkTransitionType() const = 0; | 87 virtual PageTransition GetLinkTransitionType() const = 0; |
| 84 virtual void SetLinkTransitionType(PageTransition type) = 0; | 88 virtual void SetLinkTransitionType(PageTransition type) = 0; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 const base::Value& arg3, | 133 const base::Value& arg3, |
| 130 const base::Value& arg4) = 0; | 134 const base::Value& arg4) = 0; |
| 131 virtual void CallJavascriptFunction( | 135 virtual void CallJavascriptFunction( |
| 132 const std::string& function_name, | 136 const std::string& function_name, |
| 133 const std::vector<const base::Value*>& args) = 0; | 137 const std::vector<const base::Value*>& args) = 0; |
| 134 }; | 138 }; |
| 135 | 139 |
| 136 } // namespace content | 140 } // namespace content |
| 137 | 141 |
| 138 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_ | 142 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_ |
| OLD | NEW |