| 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 #include "content/public/browser/content_browser_client.h" | 5 #include "content/public/browser/content_browser_client.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #include "net/url_request/url_request_job_factory_impl.h" |
| 9 #include "ui/gfx/image/image_skia.h" | 10 #include "ui/gfx/image/image_skia.h" |
| 10 | 11 |
| 11 namespace content { | 12 namespace content { |
| 12 | 13 |
| 13 BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts( | 14 BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts( |
| 14 const MainFunctionParams& parameters) { | 15 const MainFunctionParams& parameters) { |
| 15 return NULL; | 16 return NULL; |
| 16 } | 17 } |
| 17 | 18 |
| 18 WebContentsViewPort* ContentBrowserClient::OverrideCreateWebContentsView( | 19 WebContentsViewPort* ContentBrowserClient::OverrideCreateWebContentsView( |
| (...skipping 10 matching lines...) Expand all Loading... |
| 29 GURL ContentBrowserClient::GetEffectiveURL(BrowserContext* browser_context, | 30 GURL ContentBrowserClient::GetEffectiveURL(BrowserContext* browser_context, |
| 30 const GURL& url) { | 31 const GURL& url) { |
| 31 return url; | 32 return url; |
| 32 } | 33 } |
| 33 | 34 |
| 34 bool ContentBrowserClient::ShouldUseProcessPerSite( | 35 bool ContentBrowserClient::ShouldUseProcessPerSite( |
| 35 BrowserContext* browser_context, const GURL& effective_url) { | 36 BrowserContext* browser_context, const GURL& effective_url) { |
| 36 return false; | 37 return false; |
| 37 } | 38 } |
| 38 | 39 |
| 40 std::vector<std::string> ContentBrowserClient::GetAdditionalWebUISchemes() { |
| 41 return std::vector<std::string>(); |
| 42 } |
| 43 |
| 44 // static |
| 45 void ContentBrowserClient::InstallProtocolHandlers( |
| 46 net::URLRequestJobFactoryImpl* job_factory, |
| 47 content::ProtocolHandlerMap* protocol_handlers) { |
| 48 for (content::ProtocolHandlerMap::iterator it = |
| 49 protocol_handlers->begin(); |
| 50 it != protocol_handlers->end(); |
| 51 ++it) { |
| 52 bool set_protocol = job_factory->SetProtocolHandler( |
| 53 it->first, it->second.release()); |
| 54 DCHECK(set_protocol); |
| 55 } |
| 56 protocol_handlers->clear(); |
| 57 } |
| 58 |
| 39 net::URLRequestContextGetter* ContentBrowserClient::CreateRequestContext( | 59 net::URLRequestContextGetter* ContentBrowserClient::CreateRequestContext( |
| 40 BrowserContext* browser_context, | 60 BrowserContext* browser_context, |
| 41 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 61 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 42 blob_protocol_handler, | |
| 43 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 44 file_system_protocol_handler, | |
| 45 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 46 developer_protocol_handler, | 62 developer_protocol_handler, |
| 47 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 63 ProtocolHandlerMap* protocol_handlers) { |
| 48 chrome_protocol_handler, | |
| 49 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 50 chrome_devtools_protocol_handler) { | |
| 51 return NULL; | 64 return NULL; |
| 52 } | 65 } |
| 53 | 66 |
| 54 net::URLRequestContextGetter* | 67 net::URLRequestContextGetter* |
| 55 ContentBrowserClient::CreateRequestContextForStoragePartition( | 68 ContentBrowserClient::CreateRequestContextForStoragePartition( |
| 56 BrowserContext* browser_context, | 69 BrowserContext* browser_context, |
| 57 const base::FilePath& partition_path, | 70 const base::FilePath& partition_path, |
| 58 bool in_memory, | 71 bool in_memory, |
| 59 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 72 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 60 blob_protocol_handler, | |
| 61 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 62 file_system_protocol_handler, | |
| 63 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 64 developer_protocol_handler, | 73 developer_protocol_handler, |
| 65 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 74 ProtocolHandlerMap* protocol_handlers) { |
| 66 chrome_protocol_handler, | |
| 67 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 68 chrome_devtools_protocol_handler) { | |
| 69 return NULL; | 75 return NULL; |
| 70 } | 76 } |
| 71 | 77 |
| 72 bool ContentBrowserClient::IsHandledURL(const GURL& url) { | 78 bool ContentBrowserClient::IsHandledURL(const GURL& url) { |
| 73 return false; | 79 return false; |
| 74 } | 80 } |
| 75 | 81 |
| 76 bool ContentBrowserClient::IsSuitableHost(RenderProcessHost* process_host, | 82 bool ContentBrowserClient::IsSuitableHost(RenderProcessHost* process_host, |
| 77 const GURL& site_url) { | 83 const GURL& site_url) { |
| 78 return true; | 84 return true; |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 #endif | 289 #endif |
| 284 | 290 |
| 285 #if defined(USE_NSS) | 291 #if defined(USE_NSS) |
| 286 crypto::CryptoModuleBlockingPasswordDelegate* | 292 crypto::CryptoModuleBlockingPasswordDelegate* |
| 287 ContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { | 293 ContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { |
| 288 return NULL; | 294 return NULL; |
| 289 } | 295 } |
| 290 #endif | 296 #endif |
| 291 | 297 |
| 292 } // namespace content | 298 } // namespace content |
| OLD | NEW |