| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 152 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 153 chrome_protocol_handler, | 153 chrome_protocol_handler, |
| 154 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 154 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 155 chrome_devtools_protocol_handler); | 155 chrome_devtools_protocol_handler); |
| 156 | 156 |
| 157 // Creates the net::URLRequestContextGetter for a StoragePartition. Should | 157 // Creates the net::URLRequestContextGetter for a StoragePartition. Should |
| 158 // only be called once per partition_path per ContentBrowserClient object. | 158 // only be called once per partition_path per ContentBrowserClient object. |
| 159 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. | 159 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. |
| 160 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 160 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 161 BrowserContext* browser_context, | 161 BrowserContext* browser_context, |
| 162 const FilePath& partition_path, | 162 const base::FilePath& partition_path, |
| 163 bool in_memory, | 163 bool in_memory, |
| 164 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 164 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 165 blob_protocol_handler, | 165 blob_protocol_handler, |
| 166 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 166 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 167 file_system_protocol_handler, | 167 file_system_protocol_handler, |
| 168 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 168 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 169 developer_protocol_handler, | 169 developer_protocol_handler, |
| 170 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 170 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 171 chrome_protocol_handler, | 171 chrome_protocol_handler, |
| 172 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 172 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) {} | 454 virtual void BrowserURLHandlerCreated(BrowserURLHandler* handler) {} |
| 455 | 455 |
| 456 // Clears browser cache. | 456 // Clears browser cache. |
| 457 virtual void ClearCache(RenderViewHost* rvh) {} | 457 virtual void ClearCache(RenderViewHost* rvh) {} |
| 458 | 458 |
| 459 // Clears browser cookies. | 459 // Clears browser cookies. |
| 460 virtual void ClearCookies(RenderViewHost* rvh) {} | 460 virtual void ClearCookies(RenderViewHost* rvh) {} |
| 461 | 461 |
| 462 // Returns the default download directory. | 462 // Returns the default download directory. |
| 463 // This can be called on any thread. | 463 // This can be called on any thread. |
| 464 virtual FilePath GetDefaultDownloadDirectory(); | 464 virtual base::FilePath GetDefaultDownloadDirectory(); |
| 465 | 465 |
| 466 // Returns the default filename used in downloads when we have no idea what | 466 // Returns the default filename used in downloads when we have no idea what |
| 467 // else we should do with the file. | 467 // else we should do with the file. |
| 468 virtual std::string GetDefaultDownloadName(); | 468 virtual std::string GetDefaultDownloadName(); |
| 469 | 469 |
| 470 // Notification that a pepper plugin has just been spawned. This allows the | 470 // Notification that a pepper plugin has just been spawned. This allows the |
| 471 // embedder to add filters onto the host to implement interfaces. | 471 // embedder to add filters onto the host to implement interfaces. |
| 472 // This is called on the IO thread. | 472 // This is called on the IO thread. |
| 473 virtual void DidCreatePpapiPlugin(BrowserPpapiHost* browser_host) {} | 473 virtual void DidCreatePpapiPlugin(BrowserPpapiHost* browser_host) {} |
| 474 | 474 |
| 475 // Gets the host for an external out-of-process plugin. | 475 // Gets the host for an external out-of-process plugin. |
| 476 virtual content::BrowserPpapiHost* GetExternalBrowserPpapiHost( | 476 virtual content::BrowserPpapiHost* GetExternalBrowserPpapiHost( |
| 477 int plugin_child_id); | 477 int plugin_child_id); |
| 478 | 478 |
| 479 // Returns true if renderer processes can use Pepper TCP/UDP sockets from | 479 // Returns true if renderer processes can use Pepper TCP/UDP sockets from |
| 480 // the given origin and connection type. | 480 // the given origin and connection type. |
| 481 virtual bool AllowPepperSocketAPI(BrowserContext* browser_context, | 481 virtual bool AllowPepperSocketAPI(BrowserContext* browser_context, |
| 482 const GURL& url, | 482 const GURL& url, |
| 483 const SocketPermissionRequest& params); | 483 const SocketPermissionRequest& params); |
| 484 | 484 |
| 485 // Returns the directory containing hyphenation dictionaries. | 485 // Returns the directory containing hyphenation dictionaries. |
| 486 virtual FilePath GetHyphenDictionaryDirectory(); | 486 virtual base::FilePath GetHyphenDictionaryDirectory(); |
| 487 | 487 |
| 488 // Returns an implementation of a file selecition policy. Can return NULL. | 488 // Returns an implementation of a file selecition policy. Can return NULL. |
| 489 virtual ui::SelectFilePolicy* CreateSelectFilePolicy( | 489 virtual ui::SelectFilePolicy* CreateSelectFilePolicy( |
| 490 WebContents* web_contents); | 490 WebContents* web_contents); |
| 491 | 491 |
| 492 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 492 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 493 // Populates |mappings| with all files that need to be mapped before launching | 493 // Populates |mappings| with all files that need to be mapped before launching |
| 494 // a child process. | 494 // a child process. |
| 495 virtual void GetAdditionalMappedFilesForChildProcess( | 495 virtual void GetAdditionalMappedFilesForChildProcess( |
| 496 const CommandLine& command_line, | 496 const CommandLine& command_line, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 508 // This is called on a worker thread. | 508 // This is called on a worker thread. |
| 509 virtual | 509 virtual |
| 510 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 510 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
| 511 const GURL& url); | 511 const GURL& url); |
| 512 #endif | 512 #endif |
| 513 }; | 513 }; |
| 514 | 514 |
| 515 } // namespace content | 515 } // namespace content |
| 516 | 516 |
| 517 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 517 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |