Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 1790b0672d5759e3ce07341e6f3e998d8a835bb4..99e4a6daf7247461355ffd7479dd02ce0b1539c1 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -1429,9 +1429,8 @@ scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( |
const url::Origin& origin) { |
scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( |
new BluetoothChooserDesktop(event_handler)); |
- Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate( |
- new BluetoothChooserBubbleDelegate(browser)); |
+ new BluetoothChooserBubbleDelegate(web_contents->GetMainFrame())); |
BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get(); |
// Wire the ChooserBubbleDelegate to the BluetoothChooser. |
@@ -1439,6 +1438,7 @@ scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( |
bubble_delegate_ptr); |
bubble_delegate->set_bluetooth_chooser(bluetooth_chooser_desktop.get()); |
+ Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
BubbleReference bubble_controller = |
browser->GetBubbleManager()->ShowBubble(std::move(bubble_delegate)); |
bubble_delegate_ptr->set_bubble_controller(bubble_controller); |