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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 } | 1414 } |
1415 | 1415 |
1416 void Browser::ShowCertificateViewerInDevTools( | 1416 void Browser::ShowCertificateViewerInDevTools( |
1417 content::WebContents* web_contents, int cert_id) { | 1417 content::WebContents* web_contents, int cert_id) { |
1418 DevToolsWindow* devtools_window = | 1418 DevToolsWindow* devtools_window = |
1419 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); | 1419 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); |
1420 if (devtools_window) | 1420 if (devtools_window) |
1421 devtools_window->ShowCertificateViewer(cert_id); | 1421 devtools_window->ShowCertificateViewer(cert_id); |
1422 } | 1422 } |
1423 | 1423 |
1424 scoped_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( | 1424 std::unique_ptr<content::BluetoothChooser> Browser::RunBluetoothChooser( |
1425 content::RenderFrameHost* frame, | 1425 content::RenderFrameHost* frame, |
1426 const content::BluetoothChooser::EventHandler& event_handler) { | 1426 const content::BluetoothChooser::EventHandler& event_handler) { |
1427 scoped_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( | 1427 std::unique_ptr<BluetoothChooserDesktop> bluetooth_chooser_desktop( |
1428 new BluetoothChooserDesktop(event_handler)); | 1428 new BluetoothChooserDesktop(event_handler)); |
1429 scoped_ptr<BluetoothChooserBubbleController> bubble_controller( | 1429 std::unique_ptr<BluetoothChooserBubbleController> bubble_controller( |
1430 new BluetoothChooserBubbleController(frame)); | 1430 new BluetoothChooserBubbleController(frame)); |
1431 BluetoothChooserBubbleController* bubble_controller_ptr = | 1431 BluetoothChooserBubbleController* bubble_controller_ptr = |
1432 bubble_controller.get(); | 1432 bubble_controller.get(); |
1433 | 1433 |
1434 // Wire the ChooserBubbleController to the BluetoothChooser. | 1434 // Wire the ChooserBubbleController to the BluetoothChooser. |
1435 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_controller( | 1435 bluetooth_chooser_desktop->set_bluetooth_chooser_bubble_controller( |
1436 bubble_controller_ptr); | 1436 bubble_controller_ptr); |
1437 bubble_controller->set_bluetooth_chooser(bluetooth_chooser_desktop.get()); | 1437 bubble_controller->set_bluetooth_chooser(bluetooth_chooser_desktop.get()); |
1438 | 1438 |
1439 Browser* browser = chrome::FindBrowserWithWebContents( | 1439 Browser* browser = chrome::FindBrowserWithWebContents( |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2744 if (contents && !allow_js_access) { | 2744 if (contents && !allow_js_access) { |
2745 contents->web_contents()->GetController().LoadURL( | 2745 contents->web_contents()->GetController().LoadURL( |
2746 target_url, | 2746 target_url, |
2747 content::Referrer(), | 2747 content::Referrer(), |
2748 ui::PAGE_TRANSITION_LINK, | 2748 ui::PAGE_TRANSITION_LINK, |
2749 std::string()); // No extra headers. | 2749 std::string()); // No extra headers. |
2750 } | 2750 } |
2751 | 2751 |
2752 return contents != NULL; | 2752 return contents != NULL; |
2753 } | 2753 } |
OLD | NEW |