Chromium Code Reviews| 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/browser/plugin_service.h" | |
| 13 #include "content/common/content_client.h" | 14 #include "content/common/content_client.h" |
| 14 #include "content/common/window_container_type.h" | 15 #include "content/common/window_container_type.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresen ter.h" |
| 16 | 17 |
| 17 class BrowserRenderProcessHost; | 18 class BrowserRenderProcessHost; |
| 18 class BrowserURLHandler; | 19 class BrowserURLHandler; |
| 19 class CommandLine; | 20 class CommandLine; |
| 20 class DevToolsManager; | 21 class DevToolsManager; |
| 21 class DownloadManager; | 22 class DownloadManager; |
| 22 class FilePath; | 23 class FilePath; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 45 class NetLog; | 46 class NetLog; |
| 46 class URLRequest; | 47 class URLRequest; |
| 47 class URLRequestContext; | 48 class URLRequestContext; |
| 48 class X509Certificate; | 49 class X509Certificate; |
| 49 } | 50 } |
| 50 | 51 |
| 51 namespace ui { | 52 namespace ui { |
| 52 class Clipboard; | 53 class Clipboard; |
| 53 } | 54 } |
| 54 | 55 |
| 56 namespace webkit { | |
| 57 namespace npapi { | |
| 58 struct WebPluginInfo; | |
| 59 } | |
| 60 } | |
| 61 | |
| 55 namespace content { | 62 namespace content { |
| 56 | 63 |
| 57 class BrowserContext; | 64 class BrowserContext; |
| 58 class ResourceContext; | 65 class ResourceContext; |
| 59 class WebUIFactory; | 66 class WebUIFactory; |
| 60 | 67 |
| 61 // Embedder API (or SPI) for participating in browser logic, to be implemented | 68 // Embedder API (or SPI) for participating in browser logic, to be implemented |
| 62 // by the client of the content browser. See ChromeContentBrowserClient for the | 69 // by the client of the content browser. See ChromeContentBrowserClient for the |
| 63 // principal implementation. The methods are assumed to be called on the UI | 70 // principal implementation. The methods are assumed to be called on the UI |
| 64 // thread unless otherwise specified. Use this "escape hatch" sparingly, to | 71 // thread unless otherwise specified. Use this "escape hatch" sparingly, to |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 const std::string& cookie_line, | 151 const std::string& cookie_line, |
| 145 const content::ResourceContext& context, | 152 const content::ResourceContext& context, |
| 146 int render_process_id, | 153 int render_process_id, |
| 147 int render_view_id, | 154 int render_view_id, |
| 148 net::CookieOptions* options) = 0; | 155 net::CookieOptions* options) = 0; |
| 149 | 156 |
| 150 // This is called on the IO thread. | 157 // This is called on the IO thread. |
| 151 virtual bool AllowSaveLocalState( | 158 virtual bool AllowSaveLocalState( |
| 152 const content::ResourceContext& context) = 0; | 159 const content::ResourceContext& context) = 0; |
| 153 | 160 |
| 161 // Creates a new PluginFilter. | |
| 162 // This is called on the IO thread. | |
| 163 virtual PluginService::Filter* CreatePluginFilter( | |
|
jam
2011/08/01 03:25:44
in general, it's best to keep the embedder interfa
Bernhard Bauer
2011/08/01 16:06:12
There are two reasons for having a separate filter
jam
2011/08/01 17:25:04
You can move the "plugin->path.value() == webkit::
Bernhard Bauer
2011/08/01 18:07:39
But PluginService doesn't even get to see disabled
jam
2011/08/02 04:18:18
I see. this can be accomplished in other ways than
Bernhard Bauer
2011/08/02 12:45:08
I found a different way, by removing the default p
jam
2011/08/02 15:13:32
I wouldn't say all clients, RenderMessageFilter us
Bernhard Bauer
2011/08/02 15:52:47
But only because it already jumps to the FILE thre
Bernhard Bauer
2011/08/02 16:13:31
Elaborating a bit more, we could have an abstract
| |
| 164 int render_process_id, | |
| 165 int render_view_id, | |
| 166 const content::ResourceContext& resource_context, | |
| 167 const GURL& url, | |
| 168 const GURL& policy_url) = 0; | |
| 169 | |
| 154 // Allows the embedder to override the request context based on the URL for | 170 // Allows the embedder to override the request context based on the URL for |
| 155 // certain operations, like cookie access. Returns NULL to indicate the | 171 // certain operations, like cookie access. Returns NULL to indicate the |
| 156 // regular request context should be used. | 172 // regular request context should be used. |
| 157 // This is called on the IO thread. | 173 // This is called on the IO thread. |
| 158 virtual net::URLRequestContext* OverrideRequestContextForURL( | 174 virtual net::URLRequestContext* OverrideRequestContextForURL( |
| 159 const GURL& url, const content::ResourceContext& context) = 0; | 175 const GURL& url, const content::ResourceContext& context) = 0; |
| 160 | 176 |
| 161 // Create and return a new quota permission context. | 177 // Create and return a new quota permission context. |
| 162 virtual QuotaPermissionContext* CreateQuotaPermissionContext() = 0; | 178 virtual QuotaPermissionContext* CreateQuotaPermissionContext() = 0; |
| 163 | 179 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 // This is called on a worker thread. | 316 // This is called on a worker thread. |
| 301 virtual | 317 virtual |
| 302 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 318 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 303 const GURL& url) = 0; | 319 const GURL& url) = 0; |
| 304 #endif | 320 #endif |
| 305 }; | 321 }; |
| 306 | 322 |
| 307 } // namespace content | 323 } // namespace content |
| 308 | 324 |
| 309 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 325 #endif // CONTENT_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |