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_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback_old.h" | 11 #include "base/callback_old.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "content/common/content_client.h" | 13 #include "content/common/content_client.h" |
14 #include "content/common/window_container_type.h" | 14 #include "content/common/window_container_type.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 BrowserRenderProcessHost; | 17 class BrowserRenderProcessHost; |
18 class BrowserURLHandler; | 18 class BrowserURLHandler; |
19 class CommandLine; | 19 class CommandLine; |
20 class DevToolsManager; | 20 class DevToolsManager; |
21 class FilePath; | 21 class FilePath; |
22 class GURL; | 22 class GURL; |
23 class MHTMLGenerationManager; | 23 class MHTMLGenerationManager; |
24 class PluginProcessHost; | 24 class PluginProcessHost; |
25 class Profile; | |
26 class QuotaPermissionContext; | 25 class QuotaPermissionContext; |
27 class RenderViewHost; | 26 class RenderViewHost; |
28 class ResourceDispatcherHost; | 27 class ResourceDispatcherHost; |
29 class SSLCertErrorHandler; | 28 class SSLCertErrorHandler; |
30 class SSLClientAuthHandler; | 29 class SSLClientAuthHandler; |
31 class SavePackage; | 30 class SavePackage; |
32 class SkBitmap; | 31 class SkBitmap; |
33 class TabContents; | 32 class TabContents; |
34 class WorkerProcessHost; | 33 class WorkerProcessHost; |
35 struct DesktopNotificationHostMsg_Show_Params; | 34 struct DesktopNotificationHostMsg_Show_Params; |
(...skipping 10 matching lines...) Expand all Loading... | |
46 class URLRequestContext; | 45 class URLRequestContext; |
47 class X509Certificate; | 46 class X509Certificate; |
48 } | 47 } |
49 | 48 |
50 namespace ui { | 49 namespace ui { |
51 class Clipboard; | 50 class Clipboard; |
52 } | 51 } |
53 | 52 |
54 namespace content { | 53 namespace content { |
55 | 54 |
55 class BrowserContext; | |
56 class ResourceContext; | 56 class ResourceContext; |
57 class WebUIFactory; | 57 class WebUIFactory; |
58 | 58 |
59 // Embedder API (or SPI) for participating in browser logic, to be implemented | 59 // Embedder API (or SPI) for participating in browser logic, to be implemented |
60 // by the client of the content browser. See ChromeContentBrowserClient for the | 60 // by the client of the content browser. See ChromeContentBrowserClient for the |
61 // principal implementation. The methods are assumed to be called on the UI | 61 // principal implementation. The methods are assumed to be called on the UI |
62 // thread unless otherwise specified. Use this "escape hatch" sparingly, to | 62 // thread unless otherwise specified. Use this "escape hatch" sparingly, to |
63 // avoid the embedder interface ballooning and becoming very specific to Chrome. | 63 // avoid the embedder interface ballooning and becoming very specific to Chrome. |
64 // (Often, the call out to the client can happen in a different part of the code | 64 // (Often, the call out to the client can happen in a different part of the code |
65 // that either already has a hook out to the embedder, or calls out to one of | 65 // that either already has a hook out to the embedder, or calls out to one of |
(...skipping 17 matching lines...) Expand all Loading... | |
83 // Notifies that a WorkerProcessHost has been created. This is called | 83 // Notifies that a WorkerProcessHost has been created. This is called |
84 // before the content layer adds its own message filters, so that the | 84 // before the content layer adds its own message filters, so that the |
85 // embedder's IPC filters have priority. | 85 // embedder's IPC filters have priority. |
86 virtual void WorkerProcessHostCreated(WorkerProcessHost* host) = 0; | 86 virtual void WorkerProcessHostCreated(WorkerProcessHost* host) = 0; |
87 | 87 |
88 // Gets the WebUIFactory which will be responsible for generating WebUIs. | 88 // Gets the WebUIFactory which will be responsible for generating WebUIs. |
89 virtual WebUIFactory* GetWebUIFactory() = 0; | 89 virtual WebUIFactory* GetWebUIFactory() = 0; |
90 | 90 |
91 // Get the effective URL for the given actual URL, to allow an embedder to | 91 // Get the effective URL for the given actual URL, to allow an embedder to |
92 // group different url schemes in the same SiteInstance. | 92 // group different url schemes in the same SiteInstance. |
93 virtual GURL GetEffectiveURL(Profile* profile, const GURL& url) = 0; | 93 virtual GURL GetEffectiveURL(BrowserContext* context, const GURL& url) = 0; |
jam
2011/07/22 16:58:38
nit: browser_context (all this file + mock + chrom
| |
94 | 94 |
95 // Returns whether all instances of the specified effective URL should be | 95 // Returns whether all instances of the specified effective URL should be |
96 // rendered by the same process, rather than using process-per-site-instance. | 96 // rendered by the same process, rather than using process-per-site-instance. |
97 virtual bool ShouldUseProcessPerSite(Profile* profile, | 97 virtual bool ShouldUseProcessPerSite(BrowserContext* context, |
98 const GURL& effective_url) = 0; | 98 const GURL& effective_url) = 0; |
99 | 99 |
100 // Returns whether a specified URL is to be considered the same as any | 100 // Returns whether a specified URL is to be considered the same as any |
101 // SiteInstance. | 101 // SiteInstance. |
102 virtual bool IsURLSameAsAnySiteInstance(const GURL& url) = 0; | 102 virtual bool IsURLSameAsAnySiteInstance(const GURL& url) = 0; |
103 | 103 |
104 // See CharacterEncoding's comment. | 104 // See CharacterEncoding's comment. |
105 virtual std::string GetCanonicalEncodingNameByAliasName( | 105 virtual std::string GetCanonicalEncodingNameByAliasName( |
106 const std::string& alias_name) = 0; | 106 const std::string& alias_name) = 0; |
107 | 107 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 // Getters for common objects. | 233 // Getters for common objects. |
234 virtual ResourceDispatcherHost* GetResourceDispatcherHost() = 0; | 234 virtual ResourceDispatcherHost* GetResourceDispatcherHost() = 0; |
235 virtual ui::Clipboard* GetClipboard() = 0; | 235 virtual ui::Clipboard* GetClipboard() = 0; |
236 virtual MHTMLGenerationManager* GetMHTMLGenerationManager() = 0; | 236 virtual MHTMLGenerationManager* GetMHTMLGenerationManager() = 0; |
237 virtual DevToolsManager* GetDevToolsManager() = 0; | 237 virtual DevToolsManager* GetDevToolsManager() = 0; |
238 | 238 |
239 // Returns true if fast shutdown is possible. | 239 // Returns true if fast shutdown is possible. |
240 virtual bool IsFastShutdownPossible() = 0; | 240 virtual bool IsFastShutdownPossible() = 0; |
241 | 241 |
242 // Returns the WebKit preferences that are used by the renderer. | 242 // Returns the WebKit preferences that are used by the renderer. |
243 virtual WebPreferences GetWebkitPrefs(Profile* profile, bool is_web_ui) = 0; | 243 virtual WebPreferences GetWebkitPrefs(BrowserContext* context, |
244 bool is_web_ui) = 0; | |
244 | 245 |
245 // Inspector setting was changed and should be persisted. | 246 // Inspector setting was changed and should be persisted. |
246 virtual void UpdateInspectorSetting(RenderViewHost* rvh, | 247 virtual void UpdateInspectorSetting(RenderViewHost* rvh, |
247 const std::string& key, | 248 const std::string& key, |
248 const std::string& value) = 0; | 249 const std::string& value) = 0; |
249 | 250 |
250 // Clear the Inspector settings. | 251 // Clear the Inspector settings. |
251 virtual void ClearInspectorSettings(RenderViewHost* rvh) = 0; | 252 virtual void ClearInspectorSettings(RenderViewHost* rvh) = 0; |
252 | 253 |
253 // Notifies that BrowserURLHandler has been created, so that the embedder can | 254 // Notifies that BrowserURLHandler has been created, so that the embedder can |
(...skipping 22 matching lines...) Expand all Loading... | |
276 // This is called on a worker thread. | 277 // This is called on a worker thread. |
277 virtual | 278 virtual |
278 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 279 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
279 const GURL& url) = 0; | 280 const GURL& url) = 0; |
280 #endif | 281 #endif |
281 }; | 282 }; |
282 | 283 |
283 } // namespace content | 284 } // namespace content |
284 | 285 |
285 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 286 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |