| 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 11 matching lines...) Expand all Loading... |
| 47 class URLRequestContext; | 46 class URLRequestContext; |
| 48 class X509Certificate; | 47 class X509Certificate; |
| 49 } | 48 } |
| 50 | 49 |
| 51 namespace ui { | 50 namespace ui { |
| 52 class Clipboard; | 51 class Clipboard; |
| 53 } | 52 } |
| 54 | 53 |
| 55 namespace content { | 54 namespace content { |
| 56 | 55 |
| 56 class BrowserContext; |
| 57 class ResourceContext; | 57 class ResourceContext; |
| 58 class WebUIFactory; | 58 class WebUIFactory; |
| 59 | 59 |
| 60 // Embedder API (or SPI) for participating in browser logic, to be implemented | 60 // Embedder API (or SPI) for participating in browser logic, to be implemented |
| 61 // by the client of the content browser. See ChromeContentBrowserClient for the | 61 // by the client of the content browser. See ChromeContentBrowserClient for the |
| 62 // principal implementation. The methods are assumed to be called on the UI | 62 // principal implementation. The methods are assumed to be called on the UI |
| 63 // thread unless otherwise specified. Use this "escape hatch" sparingly, to | 63 // thread unless otherwise specified. Use this "escape hatch" sparingly, to |
| 64 // avoid the embedder interface ballooning and becoming very specific to Chrome. | 64 // avoid the embedder interface ballooning and becoming very specific to Chrome. |
| 65 // (Often, the call out to the client can happen in a different part of the code | 65 // (Often, the call out to the client can happen in a different part of the code |
| 66 // that either already has a hook out to the embedder, or calls out to one of | 66 // that either already has a hook out to the embedder, or calls out to one of |
| (...skipping 17 matching lines...) Expand all Loading... |
| 84 // Notifies that a WorkerProcessHost has been created. This is called | 84 // Notifies that a WorkerProcessHost has been created. This is called |
| 85 // before the content layer adds its own message filters, so that the | 85 // before the content layer adds its own message filters, so that the |
| 86 // embedder's IPC filters have priority. | 86 // embedder's IPC filters have priority. |
| 87 virtual void WorkerProcessHostCreated(WorkerProcessHost* host) = 0; | 87 virtual void WorkerProcessHostCreated(WorkerProcessHost* host) = 0; |
| 88 | 88 |
| 89 // Gets the WebUIFactory which will be responsible for generating WebUIs. | 89 // Gets the WebUIFactory which will be responsible for generating WebUIs. |
| 90 virtual WebUIFactory* GetWebUIFactory() = 0; | 90 virtual WebUIFactory* GetWebUIFactory() = 0; |
| 91 | 91 |
| 92 // Get the effective URL for the given actual URL, to allow an embedder to | 92 // Get the effective URL for the given actual URL, to allow an embedder to |
| 93 // group different url schemes in the same SiteInstance. | 93 // group different url schemes in the same SiteInstance. |
| 94 virtual GURL GetEffectiveURL(Profile* profile, const GURL& url) = 0; | 94 virtual GURL GetEffectiveURL(BrowserContext* browser_context, |
| 95 const GURL& url) = 0; |
| 95 | 96 |
| 96 // Returns whether all instances of the specified effective URL should be | 97 // Returns whether all instances of the specified effective URL should be |
| 97 // rendered by the same process, rather than using process-per-site-instance. | 98 // rendered by the same process, rather than using process-per-site-instance. |
| 98 virtual bool ShouldUseProcessPerSite(Profile* profile, | 99 virtual bool ShouldUseProcessPerSite(BrowserContext* browser_context, |
| 99 const GURL& effective_url) = 0; | 100 const GURL& effective_url) = 0; |
| 100 | 101 |
| 101 // Returns whether a specified URL is to be considered the same as any | 102 // Returns whether a specified URL is to be considered the same as any |
| 102 // SiteInstance. | 103 // SiteInstance. |
| 103 virtual bool IsURLSameAsAnySiteInstance(const GURL& url) = 0; | 104 virtual bool IsURLSameAsAnySiteInstance(const GURL& url) = 0; |
| 104 | 105 |
| 105 // See CharacterEncoding's comment. | 106 // See CharacterEncoding's comment. |
| 106 virtual std::string GetCanonicalEncodingNameByAliasName( | 107 virtual std::string GetCanonicalEncodingNameByAliasName( |
| 107 const std::string& alias_name) = 0; | 108 const std::string& alias_name) = 0; |
| 108 | 109 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 virtual ResourceDispatcherHost* GetResourceDispatcherHost() = 0; | 236 virtual ResourceDispatcherHost* GetResourceDispatcherHost() = 0; |
| 236 virtual ui::Clipboard* GetClipboard() = 0; | 237 virtual ui::Clipboard* GetClipboard() = 0; |
| 237 virtual MHTMLGenerationManager* GetMHTMLGenerationManager() = 0; | 238 virtual MHTMLGenerationManager* GetMHTMLGenerationManager() = 0; |
| 238 virtual DevToolsManager* GetDevToolsManager() = 0; | 239 virtual DevToolsManager* GetDevToolsManager() = 0; |
| 239 virtual net::NetLog* GetNetLog() = 0; | 240 virtual net::NetLog* GetNetLog() = 0; |
| 240 | 241 |
| 241 // Returns true if fast shutdown is possible. | 242 // Returns true if fast shutdown is possible. |
| 242 virtual bool IsFastShutdownPossible() = 0; | 243 virtual bool IsFastShutdownPossible() = 0; |
| 243 | 244 |
| 244 // Returns the WebKit preferences that are used by the renderer. | 245 // Returns the WebKit preferences that are used by the renderer. |
| 245 virtual WebPreferences GetWebkitPrefs(Profile* profile, bool is_web_ui) = 0; | 246 virtual WebPreferences GetWebkitPrefs(BrowserContext* browser_context, |
| 247 bool is_web_ui) = 0; |
| 246 | 248 |
| 247 // Inspector setting was changed and should be persisted. | 249 // Inspector setting was changed and should be persisted. |
| 248 virtual void UpdateInspectorSetting(RenderViewHost* rvh, | 250 virtual void UpdateInspectorSetting(RenderViewHost* rvh, |
| 249 const std::string& key, | 251 const std::string& key, |
| 250 const std::string& value) = 0; | 252 const std::string& value) = 0; |
| 251 | 253 |
| 252 // Clear the Inspector settings. | 254 // Clear the Inspector settings. |
| 253 virtual void ClearInspectorSettings(RenderViewHost* rvh) = 0; | 255 virtual void ClearInspectorSettings(RenderViewHost* rvh) = 0; |
| 254 | 256 |
| 255 // Notifies that BrowserURLHandler has been created, so that the embedder can | 257 // Notifies that BrowserURLHandler has been created, so that the embedder can |
| (...skipping 27 matching lines...) Expand all Loading... |
| 283 // This is called on a worker thread. | 285 // This is called on a worker thread. |
| 284 virtual | 286 virtual |
| 285 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 287 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 286 const GURL& url) = 0; | 288 const GURL& url) = 0; |
| 287 #endif | 289 #endif |
| 288 }; | 290 }; |
| 289 | 291 |
| 290 } // namespace content | 292 } // namespace content |
| 291 | 293 |
| 292 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 294 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |