blob: d794bff8de2eb2bb99e8d6c08a7a7fffb5d0b77f [file] [log] [blame]
[email protected]a48ab7112014-08-01 16:48:031// 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 Verneb5df4f72017-11-08 09:12:0711#include "services/service_manager/public/cpp/binder_registry.h"
pilgrime92c5fcd2014-09-10 23:31:2312#include "storage/browser/fileapi/file_system_context.h"
[email protected]a48ab7112014-08-01 16:48:0313
14namespace base {
15class CommandLine;
16class FilePath;
17}
18
Sam McNally52e50282017-11-29 00:54:0219namespace blink {
Nicholas Verneb5df4f72017-11-08 09:12:0720class AssociatedInterfaceRegistry;
Sam McNally52e50282017-11-29 00:54:0221}
22
23namespace content {
[email protected]a48ab7112014-08-01 16:48:0324class BrowserContext;
25class BrowserURLHandler;
26class RenderProcessHost;
27class RenderViewHost;
28class SiteInstance;
29struct WebPreferences;
30}
31
[email protected]cd501a72014-08-22 19:58:3132namespace storage {
[email protected]a48ab7112014-08-01 16:48:0333class FileSystemBackend;
34}
35
[email protected]a48ab7112014-08-01 16:48:0336class 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.
41class 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]a48ab7112014-08-01 16:48:0348 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh,
[email protected]a48ab7112014-08-01 16:48:0349 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]cd501a72014-08-22 19:58:3154 std::vector<storage::URLRequestAutoMountHandler>* handlers) {}
[email protected]a48ab7112014-08-01 16:48:0355 virtual void GetAdditionalFileSystemBackends(
56 content::BrowserContext* browser_context,
57 const base::FilePath& storage_partition_path,
avid6d88b912017-01-13 00:16:0058 std::vector<std::unique_ptr<storage::FileSystemBackend>>*
59 additional_backends) {}
[email protected]a48ab7112014-08-01 16:48:0360
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) {}
anantaa5721fb2016-08-10 19:12:2667
68 // Called when the ResourceDispatcherHost is created.
69 virtual void ResourceDispatcherHostCreated() {}
Nicholas Verneb5df4f72017-11-08 09:12:0770
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 McNally52e50282017-11-29 00:54:0277 blink::AssociatedInterfaceRegistry* associated_registry,
Nicholas Verneb5df4f72017-11-08 09:12:0778 content::RenderProcessHost* render_process_host) {}
[email protected]a48ab7112014-08-01 16:48:0379};
80
81#endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_PARTS_H_
82