| 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 "android_webview/browser/aw_content_browser_client.h" | 5 #include "android_webview/browser/aw_content_browser_client.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
| 8 #include "android_webview/browser/aw_browser_main_parts.h" | 8 #include "android_webview/browser/aw_browser_main_parts.h" |
| 9 #include "android_webview/browser/aw_contents_client_bridge_base.h" | 9 #include "android_webview/browser/aw_contents_client_bridge_base.h" |
| 10 #include "android_webview/browser/aw_cookie_access_policy.h" | 10 #include "android_webview/browser/aw_cookie_access_policy.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 112 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
| 113 host->GetID(), android_webview::kContentScheme); | 113 host->GetID(), android_webview::kContentScheme); |
| 114 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 114 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
| 115 host->GetID(), chrome::kFileScheme); | 115 host->GetID(), chrome::kFileScheme); |
| 116 } | 116 } |
| 117 | 117 |
| 118 net::URLRequestContextGetter* | 118 net::URLRequestContextGetter* |
| 119 AwContentBrowserClient::CreateRequestContext( | 119 AwContentBrowserClient::CreateRequestContext( |
| 120 content::BrowserContext* browser_context, | 120 content::BrowserContext* browser_context, |
| 121 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 121 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 122 blob_protocol_handler, | |
| 123 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 124 file_system_protocol_handler, | |
| 125 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 126 developer_protocol_handler, | 122 developer_protocol_handler, |
| 127 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 123 ProtocolHandlerMap* protocol_handlers) { |
| 128 chrome_protocol_handler, | |
| 129 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 130 chrome_devtools_protocol_handler) { | |
| 131 DCHECK(browser_context_.get() == browser_context); | 124 DCHECK(browser_context_.get() == browser_context); |
| 132 return browser_context_->CreateRequestContext( | 125 return browser_context_->CreateRequestContext( |
| 133 blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(), | 126 developer_protocol_handler.Pass(), protocol_handlers); |
| 134 developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(), | |
| 135 chrome_devtools_protocol_handler.Pass()); | |
| 136 } | 127 } |
| 137 | 128 |
| 138 net::URLRequestContextGetter* | 129 net::URLRequestContextGetter* |
| 139 AwContentBrowserClient::CreateRequestContextForStoragePartition( | 130 AwContentBrowserClient::CreateRequestContextForStoragePartition( |
| 140 content::BrowserContext* browser_context, | 131 content::BrowserContext* browser_context, |
| 141 const base::FilePath& partition_path, | 132 const base::FilePath& partition_path, |
| 142 bool in_memory, | 133 bool in_memory, |
| 143 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 134 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 144 blob_protocol_handler, | |
| 145 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 146 file_system_protocol_handler, | |
| 147 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 148 developer_protocol_handler, | 135 developer_protocol_handler, |
| 149 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 136 ProtocolHandlerMap* protocol_handlers) { |
| 150 chrome_protocol_handler, | |
| 151 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 152 chrome_devtools_protocol_handler) { | |
| 153 DCHECK(browser_context_.get() == browser_context); | 137 DCHECK(browser_context_.get() == browser_context); |
| 154 return browser_context_->CreateRequestContextForStoragePartition( | 138 return browser_context_->CreateRequestContextForStoragePartition( |
| 155 partition_path, in_memory, blob_protocol_handler.Pass(), | 139 partition_path, in_memory, developer_protocol_handler.Pass(), |
| 156 file_system_protocol_handler.Pass(), | 140 protocol_handlers); |
| 157 developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(), | |
| 158 chrome_devtools_protocol_handler.Pass()); | |
| 159 } | 141 } |
| 160 | 142 |
| 161 std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName( | 143 std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName( |
| 162 const std::string& alias_name) { | 144 const std::string& alias_name) { |
| 163 return alias_name; | 145 return alias_name; |
| 164 } | 146 } |
| 165 | 147 |
| 166 void AwContentBrowserClient::AppendExtraCommandLineSwitches( | 148 void AwContentBrowserClient::AppendExtraCommandLineSwitches( |
| 167 CommandLine* command_line, | 149 CommandLine* command_line, |
| 168 int child_process_id) { | 150 int child_process_id) { |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 | 383 |
| 402 bool AwContentBrowserClient::AllowPepperSocketAPI( | 384 bool AwContentBrowserClient::AllowPepperSocketAPI( |
| 403 content::BrowserContext* browser_context, | 385 content::BrowserContext* browser_context, |
| 404 const GURL& url, | 386 const GURL& url, |
| 405 const content::SocketPermissionRequest& params) { | 387 const content::SocketPermissionRequest& params) { |
| 406 NOTREACHED() << "Android WebView does not support plugins"; | 388 NOTREACHED() << "Android WebView does not support plugins"; |
| 407 return false; | 389 return false; |
| 408 } | 390 } |
| 409 | 391 |
| 410 } // namespace android_webview | 392 } // namespace android_webview |
| OLD | NEW |