| OLD | NEW |
| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // the call would do nothing. | 215 // the call would do nothing. |
| 216 tab->tab_contents()->WasHidden(); | 216 tab->tab_contents()->WasHidden(); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 } | 219 } |
| 220 | 220 |
| 221 if (!tabs_to_load_.empty()) { | 221 if (!tabs_to_load_.empty()) { |
| 222 force_load_timer_.Stop(); | 222 force_load_timer_.Stop(); |
| 223 // Each time we load a tab we also set a timer to force us to start loading | 223 // Each time we load a tab we also set a timer to force us to start loading |
| 224 // the next tab if this one doesn't load quickly enough. | 224 // the next tab if this one doesn't load quickly enough. |
| 225 force_load_timer_.Start(FROM_HERE, | 225 force_load_timer_.Start( |
| 226 base::TimeDelta::FromMilliseconds(force_load_delay_), | 226 base::TimeDelta::FromMilliseconds(force_load_delay_), |
| 227 this, &TabLoader::ForceLoadTimerFired); | 227 this, &TabLoader::ForceLoadTimerFired); |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 void TabLoader::Observe(int type, | 231 void TabLoader::Observe(int type, |
| 232 const NotificationSource& source, | 232 const NotificationSource& source, |
| 233 const NotificationDetails& details) { | 233 const NotificationDetails& details) { |
| 234 switch (type) { | 234 switch (type) { |
| 235 #if defined(OS_CHROMEOS) | 235 #if defined(OS_CHROMEOS) |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 std::vector<GURL> gurls; | 869 std::vector<GURL> gurls; |
| 870 SessionRestoreImpl restorer(profile, | 870 SessionRestoreImpl restorer(profile, |
| 871 static_cast<Browser*>(NULL), true, false, true, gurls); | 871 static_cast<Browser*>(NULL), true, false, true, gurls); |
| 872 restorer.RestoreForeignTab(tab); | 872 restorer.RestoreForeignTab(tab); |
| 873 } | 873 } |
| 874 | 874 |
| 875 // static | 875 // static |
| 876 bool SessionRestore::IsRestoring() { | 876 bool SessionRestore::IsRestoring() { |
| 877 return restoring; | 877 return restoring; |
| 878 } | 878 } |
| OLD | NEW |