Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <utility> | |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 13 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
| 14 #include "content/public/common/window_container_type.h" | 15 #include "content/public/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 BrowserURLHandler; | 18 class BrowserURLHandler; |
| 18 class CommandLine; | 19 class CommandLine; |
| 19 class FilePath; | 20 class FilePath; |
| 20 class GURL; | 21 class GURL; |
| 21 class MHTMLGenerationManager; | 22 class MHTMLGenerationManager; |
| 22 class PluginProcessHost; | 23 class PluginProcessHost; |
| 23 class QuotaPermissionContext; | 24 class QuotaPermissionContext; |
| 24 class RenderViewHost; | 25 class RenderViewHost; |
| 25 class ResourceDispatcherHost; | 26 class ResourceDispatcherHost; |
| 26 class SSLCertErrorHandler; | 27 class SSLCertErrorHandler; |
| 27 class SSLClientAuthHandler; | 28 class SSLClientAuthHandler; |
| 28 class SkBitmap; | 29 class SkBitmap; |
| 29 class WorkerProcessHost; | |
| 30 struct WebPreferences; | 30 struct WebPreferences; |
| 31 | 31 |
| 32 namespace content { | 32 namespace content { |
| 33 class AccessTokenStore; | 33 class AccessTokenStore; |
| 34 class BrowserMainParts; | 34 class BrowserMainParts; |
| 35 class RenderProcessHost; | 35 class RenderProcessHost; |
| 36 class SiteInstance; | 36 class SiteInstance; |
| 37 class WebContents; | 37 class WebContents; |
| 38 class WebContentsView; | 38 class WebContentsView; |
| 39 struct MainFunctionParams; | 39 struct MainFunctionParams; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 const std::string& cookie_line, | 178 const std::string& cookie_line, |
| 179 const content::ResourceContext& context, | 179 const content::ResourceContext& context, |
| 180 int render_process_id, | 180 int render_process_id, |
| 181 int render_view_id, | 181 int render_view_id, |
| 182 net::CookieOptions* options) = 0; | 182 net::CookieOptions* options) = 0; |
| 183 | 183 |
| 184 // This is called on the IO thread. | 184 // This is called on the IO thread. |
| 185 virtual bool AllowSaveLocalState( | 185 virtual bool AllowSaveLocalState( |
| 186 const content::ResourceContext& context) = 0; | 186 const content::ResourceContext& context) = 0; |
| 187 | 187 |
| 188 // Allow the embedder to control if access to web database by a worker is | 188 // Allow the embedder to control if access to web database by a shared worker |
| 189 // allowed. | 189 // is allowed. |render_views| is a vector of pairs of |
| 190 // RenderProcessID/RenderViewID of RenderViews that are using this worker. | |
| 190 // This is called on the IO thread. | 191 // This is called on the IO thread. |
| 191 virtual bool AllowWorkerDatabase(int worker_route_id, | 192 virtual bool AllowWorkerDatabase( |
| 192 const GURL& url, | 193 const GURL& url, |
| 193 const string16& name, | 194 const string16& name, |
| 194 const string16& display_name, | 195 const string16& display_name, |
| 195 unsigned long estimated_size, | 196 unsigned long estimated_size, |
| 196 WorkerProcessHost* worker_process_host) = 0; | 197 const content::ResourceContext& context, |
| 198 const std::vector<std::pair<int, int> >& render_views) = 0; | |
| 197 | 199 |
| 198 // Allow the embedder to control if access to file system by a worker is | 200 // Allow the embedder to control if access to file system by a shared worker |
|
Andrew T Wilson (Slow)
2012/02/01 05:51:37
Is this really only for shared workers?
jam
2012/02/01 16:53:53
yeah, now that only shared workers run in a separa
| |
| 199 // allowed. | 201 // is allowed. |
| 200 // This is called on the IO thread. | 202 // This is called on the IO thread. |
| 201 virtual bool AllowWorkerFileSystem( | 203 virtual bool AllowWorkerFileSystem( |
| 202 int worker_route_id, | |
| 203 const GURL& url, | 204 const GURL& url, |
| 204 WorkerProcessHost* worker_process_host) = 0; | 205 const content::ResourceContext& context, |
| 206 const std::vector<std::pair<int, int> >& render_views) = 0; | |
| 205 | 207 |
| 206 // Allows the embedder to override the request context based on the URL for | 208 // Allows the embedder to override the request context based on the URL for |
| 207 // certain operations, like cookie access. Returns NULL to indicate the | 209 // certain operations, like cookie access. Returns NULL to indicate the |
| 208 // regular request context should be used. | 210 // regular request context should be used. |
| 209 // This is called on the IO thread. | 211 // This is called on the IO thread. |
| 210 virtual net::URLRequestContext* OverrideRequestContextForURL( | 212 virtual net::URLRequestContext* OverrideRequestContextForURL( |
| 211 const GURL& url, const content::ResourceContext& context) = 0; | 213 const GURL& url, const content::ResourceContext& context) = 0; |
| 212 | 214 |
| 213 // Create and return a new quota permission context. | 215 // Create and return a new quota permission context. |
| 214 virtual QuotaPermissionContext* CreateQuotaPermissionContext() = 0; | 216 virtual QuotaPermissionContext* CreateQuotaPermissionContext() = 0; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 // This is called on a worker thread. | 351 // This is called on a worker thread. |
| 350 virtual | 352 virtual |
| 351 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 353 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 352 const GURL& url) = 0; | 354 const GURL& url) = 0; |
| 353 #endif | 355 #endif |
| 354 }; | 356 }; |
| 355 | 357 |
| 356 } // namespace content | 358 } // namespace content |
| 357 | 359 |
| 358 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 360 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |