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

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

Issue 10698068: chrome: Put browser_navigator.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: already in chrome namespace Created 8 years, 5 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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 } 959 }
960 960
961 // Appends the urls in |urls| to |browser|. 961 // Appends the urls in |urls| to |browser|.
962 void AppendURLsToBrowser(Browser* browser, 962 void AppendURLsToBrowser(Browser* browser,
963 const std::vector<GURL>& urls) { 963 const std::vector<GURL>& urls) {
964 for (size_t i = 0; i < urls.size(); ++i) { 964 for (size_t i = 0; i < urls.size(); ++i) {
965 int add_types = TabStripModel::ADD_FORCE_INDEX; 965 int add_types = TabStripModel::ADD_FORCE_INDEX;
966 if (i == 0) 966 if (i == 0)
967 add_types |= TabStripModel::ADD_ACTIVE; 967 add_types |= TabStripModel::ADD_ACTIVE;
968 int index = chrome::GetIndexForInsertionDuringRestore(browser, i); 968 int index = chrome::GetIndexForInsertionDuringRestore(browser, i);
969 browser::NavigateParams params(browser, urls[i], 969 chrome::NavigateParams params(browser, urls[i],
970 content::PAGE_TRANSITION_START_PAGE); 970 content::PAGE_TRANSITION_START_PAGE);
971 params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 971 params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
972 params.tabstrip_index = index; 972 params.tabstrip_index = index;
973 params.tabstrip_add_types = add_types; 973 params.tabstrip_add_types = add_types;
974 browser::Navigate(&params); 974 chrome::Navigate(&params);
975 } 975 }
976 } 976 }
977 977
978 // Invokes TabRestored on the SessionService for all tabs in browser after 978 // Invokes TabRestored on the SessionService for all tabs in browser after
979 // initial_count. 979 // initial_count.
980 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) { 980 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) {
981 SessionService* session_service = 981 SessionService* session_service =
982 SessionServiceFactory::GetForProfile(profile_); 982 SessionServiceFactory::GetForProfile(profile_);
983 if (!session_service) 983 if (!session_service)
984 return; 984 return;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 if (active_session_restorers == NULL) 1089 if (active_session_restorers == NULL)
1090 return false; 1090 return false;
1091 for (std::set<SessionRestoreImpl*>::const_iterator it = 1091 for (std::set<SessionRestoreImpl*>::const_iterator it =
1092 active_session_restorers->begin(); 1092 active_session_restorers->begin();
1093 it != active_session_restorers->end(); ++it) { 1093 it != active_session_restorers->end(); ++it) {
1094 if ((*it)->profile() == profile) 1094 if ((*it)->profile() == profile)
1095 return true; 1095 return true;
1096 } 1096 }
1097 return false; 1097 return false;
1098 } 1098 }
OLDNEW
« no previous file with comments | « chrome/browser/protector/session_startup_change.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698