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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
535 // the renderer. The content layer will add its own settings, and then it's up | 535 // the renderer. The content layer will add its own settings, and then it's up |
536 // to the embedder to update it if it wants. | 536 // to the embedder to update it if it wants. |
537 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, | 537 virtual void OverrideWebkitPrefs(RenderViewHost* render_view_host, |
538 WebPreferences* prefs) {} | 538 WebPreferences* prefs) {} |
539 | 539 |
540 // Notifies that BrowserURLHandler has been created, so that the embedder can | 540 // Notifies that BrowserURLHandler has been created, so that the embedder can |
541 // optionally add their own handlers. | 541 // optionally add their own handlers. |
542 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) {} | 542 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) {} |
543 | 543 |
544 // Clears browser cache. | 544 // Clears browser cache. |
545 // TODO(crbug.com/668114): Deprecated. Use BrowsingDataRemover instead. | |
545 virtual void ClearCache(RenderFrameHost* rfh) {} | 546 virtual void ClearCache(RenderFrameHost* rfh) {} |
546 | 547 |
547 // Clears browser cookies. | 548 // Clears browser cookies. |
549 // TODO(crbug.com/668114): Deprecated. Use BrowsingDataRemover instead. | |
548 virtual void ClearCookies(RenderFrameHost* rfh) {} | 550 virtual void ClearCookies(RenderFrameHost* rfh) {} |
549 | 551 |
550 // Clears |browser_context|'s data stored for the given |origin|. | 552 // Clears |browser_context|'s data stored for the given |origin|. |
551 // The datatypes to be removed are specified by |remove_cookies|, | 553 // The datatypes to be removed are specified by |remove_cookies|, |
552 // |remove_storage|, and |remove_cache|. Note that cookies should be removed | 554 // |remove_storage|, and |remove_cache|. Note that cookies should be removed |
553 // for the entire eTLD+1 of |origin|. Must call |callback| when finished. | 555 // for the entire eTLD+1 of |origin|. Must call |callback| when finished. |
556 // TODO(crbug.com/668114): Depreacated. Use BrowsingDataRemover instead. | |
554 virtual void ClearSiteData(content::BrowserContext* browser_context, | 557 virtual void ClearSiteData(content::BrowserContext* browser_context, |
555 const url::Origin& origin, | 558 const url::Origin& origin, |
556 bool remove_cookies, | 559 bool remove_cookies, |
557 bool remove_storage, | 560 bool remove_storage, |
558 bool remove_cache, | 561 bool remove_cache, |
559 const base::Closure& callback) {} | 562 const base::Closure& callback) {} |
560 | 563 |
564 // Whether the embedder allows deleting history for |browser_context|. | |
565 virtual bool MayDeleteHistory(BrowserContext* browser_context); | |
jam
2017/04/20 00:39:48
it looks like DATA_TYPE_DOWNLOADS is only set by t
msramek
2017/04/21 15:22:12
Isn't that dangerous though? If someone adds a new
jam
2017/04/21 22:58:30
Can you perhaps add a dcheck that DATA_TYPE_DOWNLO
msramek
2017/04/25 01:29:09
Unfortunately, no. Inside BrowsingDataRemoverImpl:
| |
566 | |
561 // Returns the default download directory. | 567 // Returns the default download directory. |
562 // This can be called on any thread. | 568 // This can be called on any thread. |
563 virtual base::FilePath GetDefaultDownloadDirectory(); | 569 virtual base::FilePath GetDefaultDownloadDirectory(); |
564 | 570 |
565 // Returns the default filename used in downloads when we have no idea what | 571 // Returns the default filename used in downloads when we have no idea what |
566 // else we should do with the file. | 572 // else we should do with the file. |
567 virtual std::string GetDefaultDownloadName(); | 573 virtual std::string GetDefaultDownloadName(); |
568 | 574 |
569 // Returns the path to the browser shader disk cache root. | 575 // Returns the path to the browser shader disk cache root. |
570 virtual base::FilePath GetShaderDiskCacheDirectory(); | 576 virtual base::FilePath GetShaderDiskCacheDirectory(); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
827 virtual bool ShouldRedirectDOMStorageTaskRunner(); | 833 virtual bool ShouldRedirectDOMStorageTaskRunner(); |
828 | 834 |
829 // If this returns true, all BrowserThreads (but UI/IO) that support it on | 835 // If this returns true, all BrowserThreads (but UI/IO) that support it on |
830 // this platform will experimentally be redirected to TaskScheduler. | 836 // this platform will experimentally be redirected to TaskScheduler. |
831 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); | 837 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); |
832 }; | 838 }; |
833 | 839 |
834 } // namespace content | 840 } // namespace content |
835 | 841 |
836 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 842 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |