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_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // isolation is enabled for this URL, and is a bug workaround. | 209 // isolation is enabled for this URL, and is a bug workaround. |
210 // | 210 // |
211 // TODO(nick): Remove this function once https://crbug.com/160576 is fixed, | 211 // TODO(nick): Remove this function once https://crbug.com/160576 is fixed, |
212 // and origin lock can be applied to all URLs. | 212 // and origin lock can be applied to all URLs. |
213 virtual bool ShouldLockToOrigin(BrowserContext* browser_context, | 213 virtual bool ShouldLockToOrigin(BrowserContext* browser_context, |
214 const GURL& effective_url); | 214 const GURL& effective_url); |
215 | 215 |
216 // Returns a list additional WebUI schemes, if any. These additional schemes | 216 // Returns a list additional WebUI schemes, if any. These additional schemes |
217 // act as aliases to the chrome: scheme. The additional schemes may or may | 217 // act as aliases to the chrome: scheme. The additional schemes may or may |
218 // not serve specific WebUI pages depending on the particular URLDataSource | 218 // not serve specific WebUI pages depending on the particular URLDataSource |
219 // and its override of URLDataSource::ShouldServiceRequest. For all schemes | 219 // and its override of URLDataSource::ShouldServiceRequest. |
220 // returned here, view-source is allowed. | |
221 virtual void GetAdditionalWebUISchemes( | 220 virtual void GetAdditionalWebUISchemes( |
222 std::vector<std::string>* additional_schemes) {} | 221 std::vector<std::string>* additional_schemes) {} |
223 | 222 |
| 223 // Returns a list of additional schemes allowed for view-source. Defaults to |
| 224 // the list of WebUI schemes returned by GetAdditionalWebUISchemes. |
| 225 virtual void GetAdditionalViewSourceSchemes( |
| 226 std::vector<std::string>* additional_schemes); |
| 227 |
224 // Called when WebUI objects are created to get aggregate usage data (i.e. is | 228 // Called when WebUI objects are created to get aggregate usage data (i.e. is |
225 // chrome://downloads used more than chrome://bookmarks?). Only internal (e.g. | 229 // chrome://downloads used more than chrome://bookmarks?). Only internal (e.g. |
226 // chrome://) URLs are logged. Returns whether the URL was actually logged. | 230 // chrome://) URLs are logged. Returns whether the URL was actually logged. |
227 virtual bool LogWebUIUrl(const GURL& web_ui_url) const; | 231 virtual bool LogWebUIUrl(const GURL& web_ui_url) const; |
228 | 232 |
229 // Returns whether a specified URL is handled by the embedder's internal | 233 // Returns whether a specified URL is handled by the embedder's internal |
230 // protocol handlers. | 234 // protocol handlers. |
231 virtual bool IsHandledURL(const GURL& url); | 235 virtual bool IsHandledURL(const GURL& url); |
232 | 236 |
233 // Returns whether the given process is allowed to commit |url|. This is a | 237 // Returns whether the given process is allowed to commit |url|. This is a |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 virtual bool ShouldRedirectDOMStorageTaskRunner(); | 828 virtual bool ShouldRedirectDOMStorageTaskRunner(); |
825 | 829 |
826 // If this returns true, all BrowserThreads (but UI/IO) that support it on | 830 // If this returns true, all BrowserThreads (but UI/IO) that support it on |
827 // this platform will experimentally be redirected to TaskScheduler. | 831 // this platform will experimentally be redirected to TaskScheduler. |
828 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); | 832 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); |
829 }; | 833 }; |
830 | 834 |
831 } // namespace content | 835 } // namespace content |
832 | 836 |
833 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 837 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |