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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <vector> 10 #include <vector>
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 744
745 // Appends the urls in |urls| to |browser|. 745 // Appends the urls in |urls| to |browser|.
746 void AppendURLsToBrowser(Browser* browser, 746 void AppendURLsToBrowser(Browser* browser,
747 const std::vector<GURL>& urls) { 747 const std::vector<GURL>& urls) {
748 for (size_t i = 0; i < urls.size(); ++i) { 748 for (size_t i = 0; i < urls.size(); ++i) {
749 int add_types = TabStripModel::ADD_FORCE_INDEX; 749 int add_types = TabStripModel::ADD_FORCE_INDEX;
750 if (i == 0) 750 if (i == 0)
751 add_types |= TabStripModel::ADD_ACTIVE; 751 add_types |= TabStripModel::ADD_ACTIVE;
752 int index = browser->GetIndexForInsertionDuringRestore(i); 752 int index = browser->GetIndexForInsertionDuringRestore(i);
753 browser::NavigateParams params(browser, urls[i], 753 browser::NavigateParams params(browser, urls[i],
754 PageTransition::START_PAGE); 754 content::PAGE_TRANSITION_START_PAGE);
755 params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; 755 params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
756 params.tabstrip_index = index; 756 params.tabstrip_index = index;
757 params.tabstrip_add_types = add_types; 757 params.tabstrip_add_types = add_types;
758 browser::Navigate(&params); 758 browser::Navigate(&params);
759 } 759 }
760 } 760 }
761 761
762 // Invokes TabRestored on the SessionService for all tabs in browser after 762 // Invokes TabRestored on the SessionService for all tabs in browser after
763 // initial_count. 763 // initial_count.
764 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) { 764 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 std::vector<GURL> gurls; 858 std::vector<GURL> gurls;
859 SessionRestoreImpl restorer(profile, 859 SessionRestoreImpl restorer(profile,
860 static_cast<Browser*>(NULL), true, false, true, gurls); 860 static_cast<Browser*>(NULL), true, false, true, gurls);
861 restorer.RestoreForeignTab(tab); 861 restorer.RestoreForeignTab(tab);
862 } 862 }
863 863
864 // static 864 // static
865 bool SessionRestore::IsRestoring() { 865 bool SessionRestore::IsRestoring() {
866 return restoring; 866 return restoring;
867 } 867 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service_unittest.cc ('k') | chrome/browser/sessions/session_restore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698