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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // Child processes that have different storage partition identifiers will | 267 // Child processes that have different storage partition identifiers will |
268 // behave as if they belong to different web browsers and not be able to | 268 // behave as if they belong to different web browsers and not be able to |
269 // access each other's cookies, local storage, etc. IDs must only fit the | 269 // access each other's cookies, local storage, etc. IDs must only fit the |
270 // pattern [a-z0-9]* (lowercase letters or digits). | 270 // pattern [a-z0-9]* (lowercase letters or digits). |
271 // | 271 // |
272 // Returns the empty string for the regular storage partition. | 272 // Returns the empty string for the regular storage partition. |
273 virtual std::string GetStoragePartitionIdForChildProcess( | 273 virtual std::string GetStoragePartitionIdForChildProcess( |
274 content::BrowserContext* browser_context, | 274 content::BrowserContext* browser_context, |
275 int child_process_id); | 275 int child_process_id); |
276 | 276 |
| 277 // Same as GetStoragePartitionIdForChildProcess(), but uses a SiteInstance |
| 278 // instead. |
| 279 // |
| 280 // TODO(ajwong): Replace all uses of GetStoragePartitionIdForChildProcess() |
| 281 // with this one. |
| 282 virtual std::string GetStoragePartitionIdForSiteInstance( |
| 283 content::BrowserContext* browser_context, |
| 284 content::SiteInstance* instance); |
| 285 |
| 286 // Allows the embedder to provide a validation check for |partition_id|s. |
| 287 // This domain of valid entries should match the range of outputs for |
| 288 // GetStoragePartitionIdForChildProcess(). |
| 289 virtual bool IsValidStoragePartitionId(BrowserContext* browser_context, |
| 290 const std::string& partition_id); |
| 291 |
277 // Create and return a new quota permission context. | 292 // Create and return a new quota permission context. |
278 virtual QuotaPermissionContext* CreateQuotaPermissionContext(); | 293 virtual QuotaPermissionContext* CreateQuotaPermissionContext(); |
279 | 294 |
280 // Open the given file in the desktop's default manner. | 295 // Open the given file in the desktop's default manner. |
281 virtual void OpenItem(const FilePath& path) {} | 296 virtual void OpenItem(const FilePath& path) {} |
282 | 297 |
283 // Show the given file in a file manager. If possible, select the file. | 298 // Show the given file in a file manager. If possible, select the file. |
284 virtual void ShowItemInFolder(const FilePath& path) {} | 299 virtual void ShowItemInFolder(const FilePath& path) {} |
285 | 300 |
286 // Informs the embedder that a certificate error has occured. If | 301 // Informs the embedder that a certificate error has occured. If |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 // This is called on a worker thread. | 461 // This is called on a worker thread. |
447 virtual | 462 virtual |
448 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 463 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
449 const GURL& url); | 464 const GURL& url); |
450 #endif | 465 #endif |
451 }; | 466 }; |
452 | 467 |
453 } // namespace content | 468 } // namespace content |
454 | 469 |
455 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 470 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |