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_contents_io_thread_client.h" | 10 #include "android_webview/browser/aw_contents_io_thread_client.h" |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 } | 379 } |
380 | 380 |
381 void AwContentBrowserClient::ShowDesktopNotification( | 381 void AwContentBrowserClient::ShowDesktopNotification( |
382 const content::ShowDesktopNotificationHostMsgParams& params, | 382 const content::ShowDesktopNotificationHostMsgParams& params, |
383 content::RenderFrameHost* render_frame_host, | 383 content::RenderFrameHost* render_frame_host, |
384 content::DesktopNotificationDelegate* delegate, | 384 content::DesktopNotificationDelegate* delegate, |
385 base::Closure* cancel_callback) { | 385 base::Closure* cancel_callback) { |
386 NOTREACHED() << "Android WebView does not support desktop notifications."; | 386 NOTREACHED() << "Android WebView does not support desktop notifications."; |
387 } | 387 } |
388 | 388 |
| 389 void AwContentBrowserClient::RequestGeolocationPermission( |
| 390 content::WebContents* web_contents, |
| 391 int bridge_id, |
| 392 const GURL& requesting_frame, |
| 393 bool user_gesture, |
| 394 base::Callback<void(bool)> result_callback, |
| 395 base::Closure* cancel_callback) { |
| 396 AwContentsClientBridgeBase* client = |
| 397 AwContentsClientBridgeBase::FromWebContents(web_contents); |
| 398 if (client) { |
| 399 client->RequestGeolocationPermission( |
| 400 web_contents, requesting_frame, result_callback, cancel_callback); |
| 401 } else { |
| 402 LOG(WARNING) << "Failed to find the associated bridge for geolocation " |
| 403 << "permission request."; |
| 404 result_callback.Run(false); |
| 405 } |
| 406 } |
| 407 |
389 bool AwContentBrowserClient::CanCreateWindow( | 408 bool AwContentBrowserClient::CanCreateWindow( |
390 const GURL& opener_url, | 409 const GURL& opener_url, |
391 const GURL& opener_top_level_frame_url, | 410 const GURL& opener_top_level_frame_url, |
392 const GURL& source_origin, | 411 const GURL& source_origin, |
393 WindowContainerType container_type, | 412 WindowContainerType container_type, |
394 const GURL& target_url, | 413 const GURL& target_url, |
395 const content::Referrer& referrer, | 414 const content::Referrer& referrer, |
396 WindowOpenDisposition disposition, | 415 WindowOpenDisposition disposition, |
397 const blink::WebWindowFeatures& features, | 416 const blink::WebWindowFeatures& features, |
398 bool user_gesture, | 417 bool user_gesture, |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 518 |
500 #if defined(VIDEO_HOLE) | 519 #if defined(VIDEO_HOLE) |
501 content::ExternalVideoSurfaceContainer* | 520 content::ExternalVideoSurfaceContainer* |
502 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 521 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
503 content::WebContents* web_contents) { | 522 content::WebContents* web_contents) { |
504 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); | 523 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); |
505 } | 524 } |
506 #endif | 525 #endif |
507 | 526 |
508 } // namespace android_webview | 527 } // namespace android_webview |
OLD | NEW |