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_main_parts.h" | 7 #include "android_webview/browser/aw_browser_main_parts.h" |
8 #include "android_webview/browser/aw_cookie_access_policy.h" | 8 #include "android_webview/browser/aw_cookie_access_policy.h" |
9 #include "android_webview/browser/aw_quota_permission_context.h" | 9 #include "android_webview/browser/aw_quota_permission_context.h" |
10 #include "android_webview/browser/net_disk_cache_remover.h" | 10 #include "android_webview/browser/net_disk_cache_remover.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 NOTREACHED() << "Android WebView does not support desktop notifications."; | 230 NOTREACHED() << "Android WebView does not support desktop notifications."; |
231 } | 231 } |
232 | 232 |
233 bool AwContentBrowserClient::CanCreateWindow( | 233 bool AwContentBrowserClient::CanCreateWindow( |
234 const GURL& opener_url, | 234 const GURL& opener_url, |
235 const GURL& source_origin, | 235 const GURL& source_origin, |
236 WindowContainerType container_type, | 236 WindowContainerType container_type, |
237 content::ResourceContext* context, | 237 content::ResourceContext* context, |
238 int render_process_id, | 238 int render_process_id, |
239 bool* no_javascript_access) { | 239 bool* no_javascript_access) { |
240 // TODO(boliu): Implement this to power SupportMultipleWindow. | 240 // We unconditionally allow popup windows at this stage and will give |
241 NOTIMPLEMENTED(); | 241 // the embedder the opporunity to handle displaying of the popup in |
242 *no_javascript_access = false; | 242 // WebContentsDelegate::AddContents (via the |
243 return false; | 243 // AwContentsClient.onCreateWindow callback). |
| 244 // Note that if the embedder has blocked support for creating popup |
| 245 // windows through AwSettings, then we won't get to this point as |
| 246 // the popup creation will have been blocked at the WebKit level. |
| 247 if (no_javascript_access) { |
| 248 *no_javascript_access = false; |
| 249 } |
| 250 return true; |
244 } | 251 } |
245 | 252 |
246 std::string AwContentBrowserClient::GetWorkerProcessTitle(const GURL& url, | 253 std::string AwContentBrowserClient::GetWorkerProcessTitle(const GURL& url, |
247 content::ResourceContext* context) { | 254 content::ResourceContext* context) { |
248 NOTREACHED() << "Android WebView does not yet support web workers."; | 255 NOTREACHED() << "Android WebView does not yet support web workers."; |
249 return std::string(); | 256 return std::string(); |
250 } | 257 } |
251 | 258 |
252 | 259 |
253 void AwContentBrowserClient::ResourceDispatcherHostCreated() { | 260 void AwContentBrowserClient::ResourceDispatcherHostCreated() { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 318 |
312 bool AwContentBrowserClient::AllowPepperSocketAPI( | 319 bool AwContentBrowserClient::AllowPepperSocketAPI( |
313 content::BrowserContext* browser_context, | 320 content::BrowserContext* browser_context, |
314 const GURL& url, | 321 const GURL& url, |
315 const content::SocketPermissionRequest& params) { | 322 const content::SocketPermissionRequest& params) { |
316 NOTREACHED() << "Android WebView does not support plugins"; | 323 NOTREACHED() << "Android WebView does not support plugins"; |
317 return false; | 324 return false; |
318 } | 325 } |
319 | 326 |
320 } // namespace android_webview | 327 } // namespace android_webview |
OLD | NEW |