OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "content/public/common/window_container_type.h" | 13 #include "content/public/common/window_container_type.h" |
14 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen
ter.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen
ter.h" |
16 | 16 |
17 class AccessTokenStore; | 17 class AccessTokenStore; |
18 class BrowserRenderProcessHost; | |
19 class BrowserURLHandler; | 18 class BrowserURLHandler; |
20 class CommandLine; | 19 class CommandLine; |
21 class DevToolsManager; | 20 class DevToolsManager; |
22 class FilePath; | 21 class FilePath; |
23 class GURL; | 22 class GURL; |
24 class MHTMLGenerationManager; | 23 class MHTMLGenerationManager; |
25 class PluginProcessHost; | 24 class PluginProcessHost; |
26 class QuotaPermissionContext; | 25 class QuotaPermissionContext; |
27 class RenderProcessHost; | |
28 class RenderViewHost; | 26 class RenderViewHost; |
29 class RenderWidgetHost; | 27 class RenderWidgetHost; |
30 class RenderWidgetHostView; | 28 class RenderWidgetHostView; |
31 class ResourceDispatcherHost; | 29 class ResourceDispatcherHost; |
32 class SiteInstance; | 30 class SiteInstance; |
33 class SSLCertErrorHandler; | 31 class SSLCertErrorHandler; |
34 class SSLClientAuthHandler; | 32 class SSLClientAuthHandler; |
35 class SkBitmap; | 33 class SkBitmap; |
36 class TabContents; | 34 class TabContents; |
37 class TabContentsView; | 35 class TabContentsView; |
38 class WorkerProcessHost; | 36 class WorkerProcessHost; |
39 struct WebPreferences; | 37 struct WebPreferences; |
40 | 38 |
41 namespace content { | 39 namespace content { |
42 class BrowserMainParts; | 40 class BrowserMainParts; |
43 struct MainFunctionParams; | 41 struct MainFunctionParams; |
44 struct ShowDesktopNotificationHostMsgParams; | 42 struct ShowDesktopNotificationHostMsgParams; |
| 43 class RenderProcessHost; |
45 } | 44 } |
46 | 45 |
47 namespace crypto { | 46 namespace crypto { |
48 class CryptoModuleBlockingPasswordDelegate; | 47 class CryptoModuleBlockingPasswordDelegate; |
49 } | 48 } |
50 | 49 |
51 namespace net { | 50 namespace net { |
52 class CookieList; | 51 class CookieList; |
53 class CookieOptions; | 52 class CookieOptions; |
54 class NetLog; | 53 class NetLog; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // The RenderWidgetHost must already be created (because we can't know if it's | 100 // The RenderWidgetHost must already be created (because we can't know if it's |
102 // going to be a regular RenderWidgetHost or a RenderViewHost (a subclass). | 101 // going to be a regular RenderWidgetHost or a RenderViewHost (a subclass). |
103 virtual RenderWidgetHostView* CreateViewForWidget( | 102 virtual RenderWidgetHostView* CreateViewForWidget( |
104 RenderWidgetHost* widget) = 0; | 103 RenderWidgetHost* widget) = 0; |
105 | 104 |
106 virtual TabContentsView* CreateTabContentsView(TabContents* tab_contents) = 0; | 105 virtual TabContentsView* CreateTabContentsView(TabContents* tab_contents) = 0; |
107 | 106 |
108 // Notifies that a new RenderHostView has been created. | 107 // Notifies that a new RenderHostView has been created. |
109 virtual void RenderViewHostCreated(RenderViewHost* render_view_host) = 0; | 108 virtual void RenderViewHostCreated(RenderViewHost* render_view_host) = 0; |
110 | 109 |
111 // Notifies that a BrowserRenderProcessHost has been created. This is called | 110 // Notifies that a RenderProcessHost has been created. This is called before |
112 // before the content layer adds its own BrowserMessageFilters, so that the | 111 // the content layer adds its own BrowserMessageFilters, so that the |
113 // embedder's IPC filters have priority. | 112 // embedder's IPC filters have priority. |
114 virtual void BrowserRenderProcessHostCreated( | 113 virtual void RenderProcessHostCreated( |
115 BrowserRenderProcessHost* host) = 0; | 114 content::RenderProcessHost* host) = 0; |
116 | 115 |
117 // Notifies that a PluginProcessHost has been created. This is called | 116 // Notifies that a PluginProcessHost has been created. This is called |
118 // before the content layer adds its own message filters, so that the | 117 // before the content layer adds its own message filters, so that the |
119 // embedder's IPC filters have priority. | 118 // embedder's IPC filters have priority. |
120 virtual void PluginProcessHostCreated(PluginProcessHost* host) = 0; | 119 virtual void PluginProcessHostCreated(PluginProcessHost* host) = 0; |
121 | 120 |
122 // Gets the WebUIFactory which will be responsible for generating WebUIs. | 121 // Gets the WebUIFactory which will be responsible for generating WebUIs. |
123 virtual WebUIFactory* GetWebUIFactory() = 0; | 122 virtual WebUIFactory* GetWebUIFactory() = 0; |
124 | 123 |
125 // Get the effective URL for the given actual URL, to allow an embedder to | 124 // Get the effective URL for the given actual URL, to allow an embedder to |
126 // group different url schemes in the same SiteInstance. | 125 // group different url schemes in the same SiteInstance. |
127 virtual GURL GetEffectiveURL(BrowserContext* browser_context, | 126 virtual GURL GetEffectiveURL(BrowserContext* browser_context, |
128 const GURL& url) = 0; | 127 const GURL& url) = 0; |
129 | 128 |
130 // Returns whether all instances of the specified effective URL should be | 129 // Returns whether all instances of the specified effective URL should be |
131 // rendered by the same process, rather than using process-per-site-instance. | 130 // rendered by the same process, rather than using process-per-site-instance. |
132 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, | 131 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, |
133 const GURL& effective_url) = 0; | 132 const GURL& effective_url) = 0; |
134 | 133 |
135 // Returns whether a specified URL is to be considered the same as any | 134 // Returns whether a specified URL is to be considered the same as any |
136 // SiteInstance. | 135 // SiteInstance. |
137 virtual bool IsURLSameAsAnySiteInstance(const GURL& url) = 0; | 136 virtual bool IsURLSameAsAnySiteInstance(const GURL& url) = 0; |
138 | 137 |
139 // Returns whether a new view for a given |site_url| can be launched in a | 138 // Returns whether a new view for a given |site_url| can be launched in a |
140 // given |process_host|. | 139 // given |process_host|. |
141 virtual bool IsSuitableHost(RenderProcessHost* process_host, | 140 virtual bool IsSuitableHost(content::RenderProcessHost* process_host, |
142 const GURL& site_url) = 0; | 141 const GURL& site_url) = 0; |
143 | 142 |
144 // Called when a site instance is first associated with a process. | 143 // Called when a site instance is first associated with a process. |
145 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) = 0; | 144 virtual void SiteInstanceGotProcess(SiteInstance* site_instance) = 0; |
146 | 145 |
147 // Called from a site instance's destructor. | 146 // Called from a site instance's destructor. |
148 virtual void SiteInstanceDeleting(SiteInstance* site_instance) = 0; | 147 virtual void SiteInstanceDeleting(SiteInstance* site_instance) = 0; |
149 | 148 |
150 // Returns true if for the navigation from |current_url| to |new_url|, | 149 // Returns true if for the navigation from |current_url| to |new_url|, |
151 // processes should be swapped (even if we are in a process model that | 150 // processes should be swapped (even if we are in a process model that |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // This is called on a worker thread. | 362 // This is called on a worker thread. |
364 virtual | 363 virtual |
365 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 364 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
366 const GURL& url) = 0; | 365 const GURL& url) = 0; |
367 #endif | 366 #endif |
368 }; | 367 }; |
369 | 368 |
370 } // namespace content | 369 } // namespace content |
371 | 370 |
372 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 371 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |