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

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

Issue 11359201: Remove TabContents from TabStripModelObserver::TabReplacedAt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 } 1068 }
1069 1069
1070 // Invokes TabRestored on the SessionService for all tabs in browser after 1070 // Invokes TabRestored on the SessionService for all tabs in browser after
1071 // initial_count. 1071 // initial_count.
1072 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) { 1072 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) {
1073 SessionService* session_service = 1073 SessionService* session_service =
1074 SessionServiceFactory::GetForProfile(profile_); 1074 SessionServiceFactory::GetForProfile(profile_);
1075 if (!session_service) 1075 if (!session_service)
1076 return; 1076 return;
1077 for (int i = initial_count; i < browser->tab_count(); ++i) 1077 for (int i = initial_count; i < browser->tab_count(); ++i)
1078 session_service->TabRestored(chrome::GetTabContentsAt(browser, i), 1078 session_service->TabRestored(chrome::GetWebContentsAt(browser, i),
1079 browser->tab_strip_model()->IsTabPinned(i)); 1079 browser->tab_strip_model()->IsTabPinned(i));
1080 } 1080 }
1081 1081
1082 // The profile to create the sessions for. 1082 // The profile to create the sessions for.
1083 Profile* profile_; 1083 Profile* profile_;
1084 1084
1085 // The first browser to restore to, may be null. 1085 // The first browser to restore to, may be null.
1086 Browser* browser_; 1086 Browser* browser_;
1087 1087
1088 // Whether or not restore is synchronous. 1088 // Whether or not restore is synchronous.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 if (active_session_restorers == NULL) 1182 if (active_session_restorers == NULL)
1183 return false; 1183 return false;
1184 for (std::set<SessionRestoreImpl*>::const_iterator it = 1184 for (std::set<SessionRestoreImpl*>::const_iterator it =
1185 active_session_restorers->begin(); 1185 active_session_restorers->begin();
1186 it != active_session_restorers->end(); ++it) { 1186 it != active_session_restorers->end(); ++it) {
1187 if ((*it)->profile() == profile) 1187 if ((*it)->profile() == profile)
1188 return true; 1188 return true;
1189 } 1189 }
1190 return false; 1190 return false;
1191 } 1191 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/browser_event_router.cc ('k') | chrome/browser/sessions/session_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698