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_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 const gfx::Point& location, | 150 const gfx::Point& location, |
151 bool motion) {} | 151 bool motion) {} |
152 | 152 |
153 // Request the delegate to change the zoom level of the current tab. | 153 // Request the delegate to change the zoom level of the current tab. |
154 virtual void ContentsZoomChange(bool zoom_in) {} | 154 virtual void ContentsZoomChange(bool zoom_in) {} |
155 | 155 |
156 // Check whether this contents is inside a window dedicated to running a web | 156 // Check whether this contents is inside a window dedicated to running a web |
157 // application. | 157 // application. |
158 virtual bool IsApplication() const; | 158 virtual bool IsApplication() const; |
159 | 159 |
| 160 // Check whether this contents is permitted to load data URLs in WebUI mode. |
| 161 // This is normally disallowed for security. |
| 162 virtual bool CanLoadDataURLsInWebUI() const; |
| 163 |
160 // Detach the given tab and convert it to a "webapp" view. The tab must be | 164 // Detach the given tab and convert it to a "webapp" view. The tab must be |
161 // a WebContents with a valid WebApp set. | 165 // a WebContents with a valid WebApp set. |
162 virtual void ConvertContentsToApplication(WebContents* source) {} | 166 virtual void ConvertContentsToApplication(WebContents* source) {} |
163 | 167 |
164 // Whether the specified tab can be reloaded. | 168 // Whether the specified tab can be reloaded. |
165 // Reloading can be disabled e. g. for the DevTools window. | 169 // Reloading can be disabled e. g. for the DevTools window. |
166 virtual bool CanReloadContents(WebContents* source) const; | 170 virtual bool CanReloadContents(WebContents* source) const; |
167 | 171 |
168 // Return the rect where to display the resize corner, if any, otherwise | 172 // Return the rect where to display the resize corner, if any, otherwise |
169 // an empty rect. | 173 // an empty rect. |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // Called when |this| is no longer the WebContentsDelegate for |source|. | 421 // Called when |this| is no longer the WebContentsDelegate for |source|. |
418 void Detach(WebContents* source); | 422 void Detach(WebContents* source); |
419 | 423 |
420 // The WebContents that this is currently a delegate for. | 424 // The WebContents that this is currently a delegate for. |
421 std::set<WebContents*> attached_contents_; | 425 std::set<WebContents*> attached_contents_; |
422 }; | 426 }; |
423 | 427 |
424 } // namespace content | 428 } // namespace content |
425 | 429 |
426 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 430 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |