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

Side by Side Diff: chrome/browser/ui/browser_tabrestore.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_navigator.cc ('k') | chrome/browser/ui/browser_window_state.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_tabrestore.h" 5 #include "chrome/browser/ui/browser_tabrestore.h"
6 6
7 #include "chrome/browser/extensions/tab_helper.h" 7 #include "chrome/browser/extensions/tab_helper.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sessions/session_service.h" 9 #include "chrome/browser/sessions/session_service.h"
10 #include "chrome/browser/sessions/session_service_factory.h" 10 #include "chrome/browser/sessions/session_service_factory.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (base_web_contents) { 64 if (base_web_contents) {
65 create_params.initial_size = 65 create_params.initial_size =
66 base_web_contents->GetContainerBounds().size(); 66 base_web_contents->GetContainerBounds().size();
67 } 67 }
68 WebContents* web_contents = content::WebContents::CreateWithSessionStorage( 68 WebContents* web_contents = content::WebContents::CreateWithSessionStorage(
69 create_params, 69 create_params,
70 session_storage_namespace_map); 70 session_storage_namespace_map);
71 extensions::TabHelper::CreateForWebContents(web_contents); 71 extensions::TabHelper::CreateForWebContents(web_contents);
72 extensions::TabHelper::FromWebContents(web_contents)-> 72 extensions::TabHelper::FromWebContents(web_contents)->
73 SetExtensionAppById(extension_app_id); 73 SetExtensionAppById(extension_app_id);
74 std::vector<scoped_ptr<NavigationEntry>> entries = 74 std::vector<std::unique_ptr<NavigationEntry>> entries =
75 ContentSerializedNavigationBuilder::ToNavigationEntries( 75 ContentSerializedNavigationBuilder::ToNavigationEntries(
76 navigations, browser->profile()); 76 navigations, browser->profile());
77 web_contents->SetUserAgentOverride(user_agent_override); 77 web_contents->SetUserAgentOverride(user_agent_override);
78 web_contents->GetController().Restore( 78 web_contents->GetController().Restore(
79 selected_navigation, GetRestoreType(browser, from_last_session), 79 selected_navigation, GetRestoreType(browser, from_last_session),
80 &entries); 80 &entries);
81 DCHECK_EQ(0u, entries.size()); 81 DCHECK_EQ(0u, entries.size());
82 82
83 return web_contents; 83 return web_contents;
84 } 84 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 int insertion_index = tab_strip->active_index(); 161 int insertion_index = tab_strip->active_index();
162 tab_strip->InsertWebContentsAt(insertion_index + 1, 162 tab_strip->InsertWebContentsAt(insertion_index + 1,
163 web_contents, 163 web_contents,
164 TabStripModel::ADD_ACTIVE | 164 TabStripModel::ADD_ACTIVE |
165 TabStripModel::ADD_INHERIT_GROUP); 165 TabStripModel::ADD_INHERIT_GROUP);
166 tab_strip->CloseWebContentsAt(insertion_index, TabStripModel::CLOSE_NONE); 166 tab_strip->CloseWebContentsAt(insertion_index, TabStripModel::CLOSE_NONE);
167 return web_contents; 167 return web_contents;
168 } 168 }
169 169
170 } // namespace chrome 170 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/browser_window_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698