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

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

Issue 14080004: Remove some chrome-specific methods from content::WebUI. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browser_test Created 7 years, 8 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/public/browser/web_contents.h ('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 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 factor of the monitor that the renderer is on. 55 // Returns the device scale factor of the monitor that the renderer is on.
56 // Whenever possible, WebUI should push resources with this scale factor to 56 // Whenever possible, WebUI should push resources with this scale factor to
57 // Javascript. 57 // Javascript.
58 virtual ui::ScaleFactor GetDeviceScaleFactor() const = 0; 58 virtual ui::ScaleFactor GetDeviceScaleFactor() const = 0;
59 59
60 // Returns true if the favicon should be hidden for the current tab.
61 virtual bool ShouldHideFavicon() const = 0;
62 virtual void HideFavicon() = 0;
63
64 // Returns true if the location bar should be focused by default rather than
65 // the page contents. Some pages will want to use this to encourage the user
66 // to type in the URL bar.
67 virtual bool ShouldFocusLocationBarByDefault() const = 0;
68 virtual void FocusLocationBarByDefault() = 0;
69
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.
72 virtual bool ShouldHideURL() const = 0;
73 virtual void HideURL() = 0;
74
75 // Gets a custom tab title provided by the Web UI. If there is no title 60 // 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 61 // override, the string will be empty which should trigger the default title
77 // behavior for the tab. 62 // behavior for the tab.
78 virtual const string16& GetOverriddenTitle() const = 0; 63 virtual const string16& GetOverriddenTitle() const = 0;
79 virtual void OverrideTitle(const string16& title) = 0; 64 virtual void OverrideTitle(const string16& title) = 0;
80 65
81 // Returns the transition type that should be used for link clicks on this 66 // 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. 67 // Web UI. This will default to LINK but may be overridden.
83 virtual PageTransition GetLinkTransitionType() const = 0; 68 virtual PageTransition GetLinkTransitionType() const = 0;
84 virtual void SetLinkTransitionType(PageTransition type) = 0; 69 virtual void SetLinkTransitionType(PageTransition type) = 0;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const base::Value& arg3, 114 const base::Value& arg3,
130 const base::Value& arg4) = 0; 115 const base::Value& arg4) = 0;
131 virtual void CallJavascriptFunction( 116 virtual void CallJavascriptFunction(
132 const std::string& function_name, 117 const std::string& function_name,
133 const std::vector<const base::Value*>& args) = 0; 118 const std::vector<const base::Value*>& args) = 0;
134 }; 119 };
135 120
136 } // namespace content 121 } // namespace content
137 122
138 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_ 123 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698