OLD | NEW |
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 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1420 content::WebContents* web_contents, int cert_id) { | 1420 content::WebContents* web_contents, int cert_id) { |
1421 DevToolsWindow* devtools_window = | 1421 DevToolsWindow* devtools_window = |
1422 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); | 1422 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); |
1423 if (devtools_window) | 1423 if (devtools_window) |
1424 devtools_window->ShowCertificateViewer(cert_id); | 1424 devtools_window->ShowCertificateViewer(cert_id); |
1425 } | 1425 } |
1426 | 1426 |
1427 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( | 1427 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( |
1428 content::WebContents* web_contents, | 1428 content::WebContents* web_contents, |
1429 const content::BluetoothChooser::EventHandler& event_handler, | 1429 const content::BluetoothChooser::EventHandler& event_handler, |
1430 const GURL& origin) { | 1430 const url::Origin& origin) { |
1431 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( | 1431 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( |
1432 new BluetoothChooserDesktop(event_handler)); | 1432 new BluetoothChooserDesktop(event_handler)); |
1433 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); | 1433 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
1434 scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate( | 1434 scoped_ptr<BluetoothChooserBubbleDelegate> bubble_delegate( |
1435 new BluetoothChooserBubbleDelegate(browser)); | 1435 new BluetoothChooserBubbleDelegate(browser)); |
1436 BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get(); | 1436 BluetoothChooserBubbleDelegate* bubble_delegate_ptr = bubble_delegate.get(); |
1437 | 1437 |
1438 // Wire the ChooserBubbleDelegate to the BluetoothChooser. | 1438 // Wire the ChooserBubbleDelegate to the BluetoothChooser. |
1439 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_delegate( | 1439 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_delegate( |
1440 bubble_delegate_ptr); | 1440 bubble_delegate_ptr); |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2735 if (contents && !allow_js_access) { | 2735 if (contents && !allow_js_access) { |
2736 contents->web_contents()->GetController().LoadURL( | 2736 contents->web_contents()->GetController().LoadURL( |
2737 target_url, | 2737 target_url, |
2738 content::Referrer(), | 2738 content::Referrer(), |
2739 ui::PAGE_TRANSITION_LINK, | 2739 ui::PAGE_TRANSITION_LINK, |
2740 std::string()); // No extra headers. | 2740 std::string()); // No extra headers. |
2741 } | 2741 } |
2742 | 2742 |
2743 return contents != NULL; | 2743 return contents != NULL; |
2744 } | 2744 } |
OLD | NEW |