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

Side by Side Diff: chrome/browser/protector/session_startup_change.cc

Issue 10897034: First part of PAGE_TRANSITION_START_PAGE cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 3 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 | Annotate | Revision Log
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/prefs/session_startup_pref.h" 10 #include "chrome/browser/prefs/session_startup_pref.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 // Then fallback to the first of the current startup URLs - this means that 204 // Then fallback to the first of the current startup URLs - this means that
205 // URLs themselves haven't changed. 205 // URLs themselves haven't changed.
206 return new_urls[0]; 206 return new_urls[0];
207 } 207 }
208 208
209 void SessionStartupChange::OpenPinnedTabs(Browser* browser, 209 void SessionStartupChange::OpenPinnedTabs(Browser* browser,
210 const StartupTabs& tabs) { 210 const StartupTabs& tabs) {
211 for (size_t i = 0; i < tabs.size(); ++i) { 211 for (size_t i = 0; i < tabs.size(); ++i) {
212 chrome::NavigateParams params(browser, tabs[i].url, 212 chrome::NavigateParams params(browser, tabs[i].url,
213 content::PAGE_TRANSITION_START_PAGE); 213 content::PAGE_TRANSITION_AUTO_TOPLEVEL);
214 params.disposition = NEW_BACKGROUND_TAB; 214 params.disposition = NEW_BACKGROUND_TAB;
215 params.tabstrip_index = -1; 215 params.tabstrip_index = -1;
216 params.tabstrip_add_types = TabStripModel::ADD_PINNED; 216 params.tabstrip_add_types = TabStripModel::ADD_PINNED;
217 params.extension_app_id = tabs[i].app_id; 217 params.extension_app_id = tabs[i].app_id;
218 chrome::Navigate(&params); 218 chrome::Navigate(&params);
219 } 219 }
220 } 220 }
221 221
222 BaseSettingChange* CreateSessionStartupChange( 222 BaseSettingChange* CreateSessionStartupChange(
223 const SessionStartupPref& actual_startup_pref, 223 const SessionStartupPref& actual_startup_pref,
224 const StartupTabs& actual_pinned_tabs, 224 const StartupTabs& actual_pinned_tabs,
225 const SessionStartupPref& backup_startup_pref, 225 const SessionStartupPref& backup_startup_pref,
226 const StartupTabs& backup_pinned_tabs) { 226 const StartupTabs& backup_pinned_tabs) {
227 return new SessionStartupChange(actual_startup_pref, actual_pinned_tabs, 227 return new SessionStartupChange(actual_startup_pref, actual_pinned_tabs,
228 backup_startup_pref, backup_pinned_tabs); 228 backup_startup_pref, backup_pinned_tabs);
229 } 229 }
230 230
231 } // namespace protector 231 } // namespace protector
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_preview_tab_controller.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698