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 <utility> |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 233 |
234 // Allow the embedder to control if access to IndexedDB by a shared worker | 234 // Allow the embedder to control if access to IndexedDB by a shared worker |
235 // is allowed. | 235 // is allowed. |
236 // This is called on the IO thread. | 236 // This is called on the IO thread. |
237 virtual bool AllowWorkerIndexedDB( | 237 virtual bool AllowWorkerIndexedDB( |
238 const GURL& url, | 238 const GURL& url, |
239 const string16& name, | 239 const string16& name, |
240 ResourceContext* context, | 240 ResourceContext* context, |
241 const std::vector<std::pair<int, int> >& render_views); | 241 const std::vector<std::pair<int, int> >& render_views); |
242 | 242 |
243 // Allows the embedder to override the request context based on the URL for | 243 // Allow the embedder to override the request context based on the URL for |
244 // certain operations, like cookie access. Returns NULL to indicate the | 244 // certain operations, like cookie access. Returns NULL to indicate the |
245 // regular request context should be used. | 245 // regular request context should be used. |
246 // This is called on the IO thread. | 246 // This is called on the IO thread. |
247 virtual net::URLRequestContext* OverrideRequestContextForURL( | 247 virtual net::URLRequestContext* OverrideRequestContextForURL( |
248 const GURL& url, ResourceContext* context); | 248 const GURL& url, ResourceContext* context); |
249 | 249 |
| 250 // Allow the embedder to specify storage parititon id associated with a child |
| 251 // process. |
| 252 // |
| 253 // Child processes that have different storage partition identifiers will |
| 254 // behave as if they belong to different web browsers and not be able to |
| 255 // access each other's cookies, local storage, etc. IDs must only fit the |
| 256 // pattern [a-z0-9]* (lowercase letters or digits). |
| 257 // |
| 258 // Returns the empty string for the regular storage partition. |
| 259 virtual std::string GetStoragePartitionIdForChildProcess( |
| 260 content::BrowserContext* browser_context, |
| 261 int child_process_id); |
| 262 |
250 // Create and return a new quota permission context. | 263 // Create and return a new quota permission context. |
251 virtual QuotaPermissionContext* CreateQuotaPermissionContext(); | 264 virtual QuotaPermissionContext* CreateQuotaPermissionContext(); |
252 | 265 |
253 // Open the given file in the desktop's default manner. | 266 // Open the given file in the desktop's default manner. |
254 virtual void OpenItem(const FilePath& path) {} | 267 virtual void OpenItem(const FilePath& path) {} |
255 | 268 |
256 // Show the given file in a file manager. If possible, select the file. | 269 // Show the given file in a file manager. If possible, select the file. |
257 virtual void ShowItemInFolder(const FilePath& path) {} | 270 virtual void ShowItemInFolder(const FilePath& path) {} |
258 | 271 |
259 // Informs the embedder that a certificate error has occured. If | 272 // Informs the embedder that a certificate error has occured. If |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 // This is called on a worker thread. | 432 // This is called on a worker thread. |
420 virtual | 433 virtual |
421 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 434 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
422 const GURL& url); | 435 const GURL& url); |
423 #endif | 436 #endif |
424 }; | 437 }; |
425 | 438 |
426 } // namespace content | 439 } // namespace content |
427 | 440 |
428 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 441 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |