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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698