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

Unified Diff: chrome/browser/ui/browser.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: Fix Android 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | content/browser/bluetooth/bluetooth_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index f16a9917f8d1c721bb021d922686ac9a613084ae..b5f04ec5736534c2328843942be3433dc58e0206 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1415,13 +1415,12 @@ void Browser::ShowCertificateViewerInDevTools(
}
scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser(
- content::WebContents* web_contents,
- const content::BluetoothChooser::EventHandler& event_handler,
- const url::Origin& origin) {
+ content::RenderFrameHost* frame,
+ const content::BluetoothChooser::EventHandler& event_handler) {
scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop(
new BluetoothChooserDesktop(event_handler));
scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate(
- new BluetoothChooserBubbleDelegate(web_contents->GetMainFrame()));
+ new BluetoothChooserBubbleDelegate(frame));
BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get();
// Wire the ChooserBubbleDelegate to the BluetoothChooser.
@@ -1429,7 +1428,8 @@ scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser(
bubble_delegate_ptr);
bubble_delegate->set_bluetooth_chooser(bluetooth_chooser_desktop.get());
- Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
+ Browser* browser = chrome::FindBrowserWithWebContents(
+ WebContents::FromRenderFrameHost(frame));
BubbleReference bubble_controller =
browser->GetBubbleManager()->ShowBubble(std::move(bubble_delegate));
bubble_delegate_ptr->set_bubble_controller(bubble_controller);
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | content/browser/bluetooth/bluetooth_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698