[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_PARTS_H_ |
| 6 | #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_PARTS_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
Nicholas Verne | b5df4f7 | 2017-11-08 09:12:07 | [diff] [blame] | 11 | #include "services/service_manager/public/cpp/binder_registry.h" |
pilgrim | e92c5fcd | 2014-09-10 23:31:23 | [diff] [blame] | 12 | #include "storage/browser/fileapi/file_system_context.h" |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 13 | |
| 14 | namespace base { |
| 15 | class CommandLine; |
| 16 | class FilePath; |
| 17 | } |
| 18 | |
Sam McNally | 52e5028 | 2017-11-29 00:54:02 | [diff] [blame] | 19 | namespace blink { |
Nicholas Verne | b5df4f7 | 2017-11-08 09:12:07 | [diff] [blame] | 20 | class AssociatedInterfaceRegistry; |
Sam McNally | 52e5028 | 2017-11-29 00:54:02 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | namespace content { |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 24 | class BrowserContext; |
| 25 | class BrowserURLHandler; |
| 26 | class RenderProcessHost; |
| 27 | class RenderViewHost; |
| 28 | class SiteInstance; |
| 29 | struct WebPreferences; |
| 30 | } |
| 31 | |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 32 | namespace storage { |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 33 | class FileSystemBackend; |
| 34 | } |
| 35 | |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 36 | class Profile; |
| 37 | |
| 38 | // Implements a platform or feature specific part of ChromeContentBrowserClient. |
| 39 | // All the public methods corresponds to the methods of the same name in |
| 40 | // content::ContentBrowserClient. |
| 41 | class ChromeContentBrowserClientParts { |
| 42 | public: |
| 43 | virtual ~ChromeContentBrowserClientParts() {} |
| 44 | |
| 45 | virtual void RenderProcessWillLaunch(content::RenderProcessHost* host) {} |
| 46 | virtual void SiteInstanceGotProcess(content::SiteInstance* site_instance) {} |
| 47 | virtual void SiteInstanceDeleting(content::SiteInstance* site_instance) {} |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 48 | virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 49 | content::WebPreferences* web_prefs) {} |
| 50 | virtual void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) {} |
| 51 | virtual void GetAdditionalAllowedSchemesForFileSystem( |
| 52 | std::vector<std::string>* additional_allowed_schemes) {} |
| 53 | virtual void GetURLRequestAutoMountHandlers( |
[email protected] | cd501a7 | 2014-08-22 19:58:31 | [diff] [blame] | 54 | std::vector<storage::URLRequestAutoMountHandler>* handlers) {} |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 55 | virtual void GetAdditionalFileSystemBackends( |
| 56 | content::BrowserContext* browser_context, |
| 57 | const base::FilePath& storage_partition_path, |
avi | d6d88b91 | 2017-01-13 00:16:00 | [diff] [blame] | 58 | std::vector<std::unique_ptr<storage::FileSystemBackend>>* |
| 59 | additional_backends) {} |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 60 | |
| 61 | // Append extra switches to |command_line| for |process|. If |process| is not |
| 62 | // NULL, then neither is |profile|. |
| 63 | virtual void AppendExtraRendererCommandLineSwitches( |
| 64 | base::CommandLine* command_line, |
| 65 | content::RenderProcessHost* process, |
| 66 | Profile* profile) {} |
ananta | a5721fb | 2016-08-10 19:12:26 | [diff] [blame] | 67 | |
| 68 | // Called when the ResourceDispatcherHost is created. |
| 69 | virtual void ResourceDispatcherHostCreated() {} |
Nicholas Verne | b5df4f7 | 2017-11-08 09:12:07 | [diff] [blame] | 70 | |
| 71 | // Allows to register browser interfaces exposed through the |
| 72 | // RenderProcessHost. Note that interface factory callbacks added to |
| 73 | // |registry| will by default be run immediately on the IO thread, unless a |
| 74 | // task runner is provided. |
| 75 | virtual void ExposeInterfacesToRenderer( |
| 76 | service_manager::BinderRegistry* registry, |
Sam McNally | 52e5028 | 2017-11-29 00:54:02 | [diff] [blame] | 77 | blink::AssociatedInterfaceRegistry* associated_registry, |
Nicholas Verne | b5df4f7 | 2017-11-08 09:12:07 | [diff] [blame] | 78 | content::RenderProcessHost* render_process_host) {} |
[email protected] | a48ab711 | 2014-08-01 16:48:03 | [diff] [blame] | 79 | }; |
| 80 | |
| 81 | #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_PARTS_H_ |
| 82 | |