| 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/callback.h" | 10 #include "base/callback.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Whenever possible, WebUI should push resources with this scale factor to | 55 // Whenever possible, WebUI should push resources with this scale factor to |
| 56 // Javascript. | 56 // Javascript. |
| 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 | |
| 66 // Web UI. This will default to LINK but may be overridden. | |
| 67 virtual ui::PageTransition GetLinkTransitionType() const = 0; | |
| 68 virtual void SetLinkTransitionType(ui::PageTransition type) = 0; | |
| 69 | |
| 70 // Allows a controller to override the BindingsPolicy that should be enabled | 65 // Allows a controller to override the BindingsPolicy that should be enabled |
| 71 // for this page. | 66 // for this page. |
| 72 virtual int GetBindings() const = 0; | 67 virtual int GetBindings() const = 0; |
| 73 virtual void SetBindings(int bindings) = 0; | 68 virtual void SetBindings(int bindings) = 0; |
| 74 | 69 |
| 75 // Whether this WebUI has a render frame associated with it. This will be true | 70 // Whether this WebUI has a render frame associated with it. This will be true |
| 76 // if the URL that created this WebUI was actually visited. | 71 // if the URL that created this WebUI was actually visited. |
| 77 virtual bool HasRenderFrame() = 0; | 72 virtual bool HasRenderFrame() = 0; |
| 78 | 73 |
| 79 // Takes ownership of |handler|, which will be destroyed when the WebUI is. | 74 // Takes ownership of |handler|, which will be destroyed when the WebUI is. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 const std::string& function_name, | 121 const std::string& function_name, |
| 127 const std::vector<const base::Value*>& args) = 0; | 122 const std::vector<const base::Value*>& args) = 0; |
| 128 | 123 |
| 129 // Allows mutable access to this WebUI's message handlers for testing. | 124 // Allows mutable access to this WebUI's message handlers for testing. |
| 130 virtual ScopedVector<WebUIMessageHandler>* GetHandlersForTesting() = 0; | 125 virtual ScopedVector<WebUIMessageHandler>* GetHandlersForTesting() = 0; |
| 131 }; | 126 }; |
| 132 | 127 |
| 133 } // namespace content | 128 } // namespace content |
| 134 | 129 |
| 135 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_ | 130 #endif // CONTENT_PUBLIC_BROWSER_WEB_UI_H_ |
| OLD | NEW |