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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 1601323002: Use GetLastCommittedOrigin instead of GetLastCommittedURL in bluetooth chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use GetLastCommittedOrigin instead of GetLastCommittedURL Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 content::WebContents* web_contents, int cert_id) { 1418 content::WebContents* web_contents, int cert_id) {
1419 DevToolsWindow* devtools_window = 1419 DevToolsWindow* devtools_window =
1420 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); 1420 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents);
1421 if (devtools_window) 1421 if (devtools_window)
1422 devtools_window->ShowCertificateViewer(cert_id); 1422 devtools_window->ShowCertificateViewer(cert_id);
1423 } 1423 }
1424 1424
1425 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( 1425 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser(
1426 content::WebContents* web_contents, 1426 content::WebContents* web_contents,
1427 const content::BluetoothChooser::EventHandler& event_handler, 1427 const content::BluetoothChooser::EventHandler& event_handler,
1428 const GURL& origin) { 1428 const url::Origin& origin) {
1429 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( 1429 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop(
1430 new BluetoothChooserDesktop(event_handler)); 1430 new BluetoothChooserDesktop(event_handler));
1431 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); 1431 Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
1432 scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate( 1432 scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate(
1433 new BluetoothChooserBubbleDelegate(browser)); 1433 new BluetoothChooserBubbleDelegate(browser));
1434 BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get(); 1434 BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get();
1435 1435
1436 // Wire the ChooserBubbleDelegate to the BluetoothChooser. 1436 // Wire the ChooserBubbleDelegate to the BluetoothChooser.
1437 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_delegate( 1437 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_delegate(
1438 bubble_delegate_ptr); 1438 bubble_delegate_ptr);
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
2737 if (contents && !allow_js_access) { 2737 if (contents && !allow_js_access) {
2738 contents->web_contents()->GetController().LoadURL( 2738 contents->web_contents()->GetController().LoadURL(
2739 target_url, 2739 target_url,
2740 content::Referrer(), 2740 content::Referrer(),
2741 ui::PAGE_TRANSITION_LINK, 2741 ui::PAGE_TRANSITION_LINK,
2742 std::string()); // No extra headers. 2742 std::string()); // No extra headers.
2743 } 2743 }
2744 2744
2745 return contents != NULL; 2745 return contents != NULL;
2746 } 2746 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698