Chromium Code Reviews| 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."; | |
|
mkosiba (inactive)
2014/06/13 08:17:03
do we need to result_callback.Run(false); in this
jam
2014/06/13 14:56:08
Done.
| |
| 404 } | |
| 405 } | |
| 406 | |
| 389 bool AwContentBrowserClient::CanCreateWindow( | 407 bool AwContentBrowserClient::CanCreateWindow( |
| 390 const GURL& opener_url, | 408 const GURL& opener_url, |
| 391 const GURL& opener_top_level_frame_url, | 409 const GURL& opener_top_level_frame_url, |
| 392 const GURL& source_origin, | 410 const GURL& source_origin, |
| 393 WindowContainerType container_type, | 411 WindowContainerType container_type, |
| 394 const GURL& target_url, | 412 const GURL& target_url, |
| 395 const content::Referrer& referrer, | 413 const content::Referrer& referrer, |
| 396 WindowOpenDisposition disposition, | 414 WindowOpenDisposition disposition, |
| 397 const blink::WebWindowFeatures& features, | 415 const blink::WebWindowFeatures& features, |
| 398 bool user_gesture, | 416 bool user_gesture, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 499 | 517 |
| 500 #if defined(VIDEO_HOLE) | 518 #if defined(VIDEO_HOLE) |
| 501 content::ExternalVideoSurfaceContainer* | 519 content::ExternalVideoSurfaceContainer* |
| 502 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 520 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
| 503 content::WebContents* web_contents) { | 521 content::WebContents* web_contents) { |
| 504 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); | 522 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); |
| 505 } | 523 } |
| 506 #endif | 524 #endif |
| 507 | 525 |
| 508 } // namespace android_webview | 526 } // namespace android_webview |
| OLD | NEW |