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

Side by Side Diff: chrome/browser/sessions/session_restore.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 "chrome/browser/sessions/session_restore.h" 5 #include "chrome/browser/sessions/session_restore.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 978
979 // Appends the urls in |urls| to |browser|. 979 // Appends the urls in |urls| to |browser|.
980 void AppendURLsToBrowser(Browser* browser, 980 void AppendURLsToBrowser(Browser* browser,
981 const std::vector<GURL>& urls) { 981 const std::vector<GURL>& urls) {
982 for (size_t i = 0; i < urls.size(); ++i) { 982 for (size_t i = 0; i < urls.size(); ++i) {
983 int add_types = TabStripModel::ADD_FORCE_INDEX; 983 int add_types = TabStripModel::ADD_FORCE_INDEX;
984 if (i == 0) 984 if (i == 0)
985 add_types |= TabStripModel::ADD_ACTIVE; 985 add_types |= TabStripModel::ADD_ACTIVE;
986 int index = chrome::GetIndexForInsertionDuringRestore(browser, i); 986 int index = chrome::GetIndexForInsertionDuringRestore(browser, i);
987 chrome::NavigateParams params(browser, urls[i], 987 chrome::NavigateParams params(browser, urls[i],
988 content::PAGE_TRANSITION_START_PAGE); 988 content::PAGE_TRANSITION_AUTO_TOPLEVEL);
989 params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 989 params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
990 params.tabstrip_index = index; 990 params.tabstrip_index = index;
991 params.tabstrip_add_types = add_types; 991 params.tabstrip_add_types = add_types;
992 chrome::Navigate(&params); 992 chrome::Navigate(&params);
993 } 993 }
994 } 994 }
995 995
996 // Invokes TabRestored on the SessionService for all tabs in browser after 996 // Invokes TabRestored on the SessionService for all tabs in browser after
997 // initial_count. 997 // initial_count.
998 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) { 998 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 if (active_session_restorers == NULL) 1107 if (active_session_restorers == NULL)
1108 return false; 1108 return false;
1109 for (std::set<SessionRestoreImpl*>::const_iterator it = 1109 for (std::set<SessionRestoreImpl*>::const_iterator it =
1110 active_session_restorers->begin(); 1110 active_session_restorers->begin();
1111 it != active_session_restorers->end(); ++it) { 1111 it != active_session_restorers->end(); ++it) {
1112 if ((*it)->profile() == profile) 1112 if ((*it)->profile() == profile)
1113 return true; 1113 return true;
1114 } 1114 }
1115 return false; 1115 return false;
1116 } 1116 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698