[M120][Tizen][Onscreen] Fix build errors for TV profile
[platform/framework/web/chromium-efl.git] / chrome / browser / chrome_content_browser_client_parts.h
1 // Copyright 2014 The Chromium Authors
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
11 #include "components/download/public/common/quarantine_connection.h"
12 #include "services/service_manager/public/cpp/binder_registry.h"
13 #include "storage/browser/file_system/file_system_context.h"
14
15 namespace base {
16 class CommandLine;
17 class FilePath;
18 }
19
20 namespace blink {
21 namespace web_pref {
22 struct WebPreferences;
23 }  // namespace web_pref
24 class AssociatedInterfaceRegistry;
25 }
26
27 namespace content {
28 class BrowserContext;
29 class BrowserURLHandler;
30 class RenderFrameHost;
31 class RenderProcessHost;
32 struct ServiceWorkerVersionBaseInfo;
33 class SiteInstance;
34 class WebContents;
35 }
36
37 namespace storage {
38 class FileSystemBackend;
39 }
40
41 class Profile;
42
43 // Implements a platform or feature specific part of ChromeContentBrowserClient.
44 // All the public methods corresponds to the methods of the same name in
45 // content::ContentBrowserClient.
46 class ChromeContentBrowserClientParts {
47  public:
48   virtual ~ChromeContentBrowserClientParts() {}
49
50   virtual void RenderProcessWillLaunch(content::RenderProcessHost* host) {}
51   virtual void SiteInstanceGotProcess(content::SiteInstance* site_instance) {}
52
53   // Subclasses that override webkit preferences are responsible for ensuring
54   // that their modifications are mututally exclusive.
55   // This is called at startup, and when the user changes their webkit
56   // preferences.
57   virtual void OverrideWebkitPrefs(content::WebContents* web_contents,
58                                    blink::web_pref::WebPreferences* web_prefs) {
59   }
60   // This is called after each navigation. Return |true| if any changes were
61   // made. A response value of |true| will result in IPC to the renderer.
62   virtual bool OverrideWebPreferencesAfterNavigation(
63       content::WebContents* web_contents,
64       blink::web_pref::WebPreferences* web_prefs);
65
66   virtual void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) {}
67   virtual void GetAdditionalAllowedSchemesForFileSystem(
68       std::vector<std::string>* additional_allowed_schemes) {}
69   virtual void GetURLRequestAutoMountHandlers(
70       std::vector<storage::URLRequestAutoMountHandler>* handlers) {}
71   virtual void GetAdditionalFileSystemBackends(
72       content::BrowserContext* browser_context,
73       const base::FilePath& storage_partition_path,
74       download::QuarantineConnectionCallback quarantine_connection_callback,
75       std::vector<std::unique_ptr<storage::FileSystemBackend>>*
76           additional_backends) {}
77
78   // Append extra switches to |command_line| for |process|. If |process| is not
79   // NULL, then neither is |profile|.
80   virtual void AppendExtraRendererCommandLineSwitches(
81       base::CommandLine* command_line,
82       content::RenderProcessHost* process,
83       Profile* profile) {}
84
85   // Allows to register browser interfaces exposed through the
86   // RenderProcessHost. Note that interface factory callbacks added to
87   // |registry| will by default be run immediately on the IO thread, unless a
88   // task runner is provided.
89   virtual void ExposeInterfacesToRenderer(
90       service_manager::BinderRegistry* registry,
91       blink::AssociatedInterfaceRegistry* associated_registry,
92       content::RenderProcessHost* render_process_host) {}
93
94   // Allows to register browser interfaces exposed to a ServiceWorker.
95   virtual void ExposeInterfacesToRendererForServiceWorker(
96       const content::ServiceWorkerVersionBaseInfo& service_worker_version_info,
97       blink::AssociatedInterfaceRegistry& associated_registry) {}
98
99   // Allows to register browser interfaces exposed to a RenderFrameHost.
100   virtual void ExposeInterfacesToRendererForRenderFrameHost(
101       content::RenderFrameHost& frame_host,
102       blink::AssociatedInterfaceRegistry& associated_registry) {}
103 };
104
105 #endif  // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_PARTS_H_
106