Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2905)

Unified Diff: chrome/browser/ui/android/bluetooth_chooser_android.cc

Issue 1672103002: Pass the frame instead of the WebContents through RunBluetoothChooser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@doc-bubble-lifetimes
Patch Set: Sync Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/bluetooth_chooser_android.cc
diff --git a/chrome/browser/ui/android/bluetooth_chooser_android.cc b/chrome/browser/ui/android/bluetooth_chooser_android.cc
index 5094a9400f2828ed25928f4f1bd5d22cb75775df..6c66ee9072d9aa99c9b8254606e5a950163c60b0 100644
--- a/chrome/browser/ui/android/bluetooth_chooser_android.cc
+++ b/chrome/browser/ui/android/bluetooth_chooser_android.cc
@@ -20,11 +20,13 @@ using base::android::ConvertUTF16ToJavaString;
using base::android::ScopedJavaLocalRef;
BluetoothChooserAndroid::BluetoothChooserAndroid(
- content::WebContents* web_contents,
+ content::RenderFrameHost* frame,
const EventHandler& event_handler,
const url::Origin& origin)
: event_handler_(event_handler) {
DCHECK(!origin.unique());
+ content::WebContents* web_contents =
+ content::WebContents::FromRenderFrameHost(frame);
base::android::ScopedJavaLocalRef<jobject> window_android =
content::ContentViewCore::FromWebContents(
web_contents)->GetWindowAndroid()->GetJavaObject();

Powered by Google App Engine
This is Rietveld 408576698