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" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/public/common/page_transition_types.h" | 14 #include "ui/base/page_transition_types.h" |
15 | 15 |
16 class GURL; | 16 class GURL; |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class ListValue; | 19 class ListValue; |
20 class Value; | 20 class Value; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 virtual float GetDeviceScaleFactor() const = 0; | 57 virtual float GetDeviceScaleFactor() const = 0; |
58 | 58 |
59 // Gets a custom tab title provided by the Web UI. If there is no title | 59 // Gets a custom tab title provided by the Web UI. If there is no title |
60 // override, the string will be empty which should trigger the default title | 60 // override, the string will be empty which should trigger the default title |
61 // behavior for the tab. | 61 // behavior for the tab. |
62 virtual const base::string16& GetOverriddenTitle() const = 0; | 62 virtual const base::string16& GetOverriddenTitle() const = 0; |
63 virtual void OverrideTitle(const base::string16& title) = 0; | 63 virtual void OverrideTitle(const base::string16& title) = 0; |
64 | 64 |
65 // Returns the transition type that should be used for link clicks on this | 65 // Returns the transition type that should be used for link clicks on this |
66 // Web UI. This will default to LINK but may be overridden. | 66 // Web UI. This will default to LINK but may be overridden. |
67 virtual PageTransition GetLinkTransitionType() const = 0; | 67 virtual ui::PageTransition GetLinkTransitionType() const = 0; |
68 virtual void SetLinkTransitionType(PageTransition type) = 0; | 68 virtual void SetLinkTransitionType(ui::PageTransition type) = 0; |
69 | 69 |
70 // Allows a controller to override the BindingsPolicy that should be enabled | 70 // Allows a controller to override the BindingsPolicy that should be enabled |
71 // for this page. | 71 // for this page. |
72 virtual int GetBindings() const = 0; | 72 virtual int GetBindings() const = 0; |
73 virtual void SetBindings(int bindings) = 0; | 73 virtual void SetBindings(int bindings) = 0; |
74 | 74 |
75 // Overrides which frame gets JavaScript messages; this is useful if this | 75 // Overrides which frame gets JavaScript messages; this is useful if this |
76 // WebUI is embedded in a page. If no override is set, the main frame will | 76 // WebUI is embedded in a page. If no override is set, the main frame will |
77 // receive the JavaScript messages. | 77 // receive the JavaScript messages. |
78 virtual void OverrideJavaScriptFrame(const std::string& frame_name) = 0; | 78 virtual void OverrideJavaScriptFrame(const std::string& frame_name) = 0; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const base::Value& arg3, | 115 const base::Value& arg3, |
116 const base::Value& arg4) = 0; | 116 const base::Value& arg4) = 0; |
117 virtual void CallJavascriptFunction( | 117 virtual void CallJavascriptFunction( |
118 const std::string& function_name, | 118 const std::string& function_name, |
119 const std::vector<const base::Value*>& args) = 0; | 119 const std::vector<const base::Value*>& args) = 0; |
120 }; | 120 }; |
121 | 121 |
122 } // namespace content | 122 } // namespace content |
123 | 123 |
124 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_ | 124 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_ |
OLD | NEW |