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

Side by Side Diff: chrome/browser/sessions/session_restore.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 } 1116 }
1117 1117
1118 // Appends the urls in |urls| to |browser|. 1118 // Appends the urls in |urls| to |browser|.
1119 void AppendURLsToBrowser(Browser* browser, 1119 void AppendURLsToBrowser(Browser* browser,
1120 const std::vector<GURL>& urls) { 1120 const std::vector<GURL>& urls) {
1121 for (size_t i = 0; i < urls.size(); ++i) { 1121 for (size_t i = 0; i < urls.size(); ++i) {
1122 int add_types = TabStripModel::ADD_FORCE_INDEX; 1122 int add_types = TabStripModel::ADD_FORCE_INDEX;
1123 if (i == 0) 1123 if (i == 0)
1124 add_types |= TabStripModel::ADD_ACTIVE; 1124 add_types |= TabStripModel::ADD_ACTIVE;
1125 chrome::NavigateParams params(browser, urls[i], 1125 chrome::NavigateParams params(browser, urls[i],
1126 content::PAGE_TRANSITION_AUTO_TOPLEVEL); 1126 ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
1127 params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 1127 params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
1128 params.tabstrip_add_types = add_types; 1128 params.tabstrip_add_types = add_types;
1129 chrome::Navigate(&params); 1129 chrome::Navigate(&params);
1130 } 1130 }
1131 } 1131 }
1132 1132
1133 // Invokes TabRestored on the SessionService for all tabs in browser after 1133 // Invokes TabRestored on the SessionService for all tabs in browser after
1134 // initial_count. 1134 // initial_count.
1135 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) { 1135 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) {
1136 SessionService* session_service = 1136 SessionService* session_service =
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 if (!active_session_restorers) 1289 if (!active_session_restorers)
1290 return false; 1290 return false;
1291 for (std::set<SessionRestoreImpl*>::const_iterator it = 1291 for (std::set<SessionRestoreImpl*>::const_iterator it =
1292 active_session_restorers->begin(); 1292 active_session_restorers->begin();
1293 it != active_session_restorers->end(); ++it) { 1293 it != active_session_restorers->end(); ++it) {
1294 if ((*it)->synchronous()) 1294 if ((*it)->synchronous())
1295 return true; 1295 return true;
1296 } 1296 }
1297 return false; 1297 return false;
1298 } 1298 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698