OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 Browser::MAXIMIZED_STATE_MAXIMIZED : | 315 Browser::MAXIMIZED_STATE_MAXIMIZED : |
316 Browser::MAXIMIZED_STATE_UNMAXIMIZED); | 316 Browser::MAXIMIZED_STATE_UNMAXIMIZED); |
317 browser->CreateBrowserWindow(); | 317 browser->CreateBrowserWindow(); |
318 | 318 |
319 // Restore and show the browser. | 319 // Restore and show the browser. |
320 const int initial_tab_count = browser->tab_count(); | 320 const int initial_tab_count = browser->tab_count(); |
321 RestoreTabsToBrowser(*(*i), browser); | 321 RestoreTabsToBrowser(*(*i), browser); |
322 ShowBrowser(browser, initial_tab_count, | 322 ShowBrowser(browser, initial_tab_count, |
323 (*i)->selected_tab_index); | 323 (*i)->selected_tab_index); |
324 NotifySessionServiceOfRestoredTabs(browser, initial_tab_count); | 324 NotifySessionServiceOfRestoredTabs(browser, initial_tab_count); |
325 FinishedTabCreation(true, has_tabbed_browser); | |
326 } | 325 } |
| 326 FinishedTabCreation(true, has_tabbed_browser); |
327 } | 327 } |
328 | 328 |
329 ~SessionRestoreImpl() { | 329 ~SessionRestoreImpl() { |
330 STLDeleteElements(&windows_); | 330 STLDeleteElements(&windows_); |
331 restoring = false; | 331 restoring = false; |
332 } | 332 } |
333 | 333 |
334 virtual void Observe(NotificationType type, | 334 virtual void Observe(NotificationType type, |
335 const NotificationSource& source, | 335 const NotificationSource& source, |
336 const NotificationDetails& details) { | 336 const NotificationDetails& details) { |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 void SessionRestore::RestoreSessionSynchronously( | 658 void SessionRestore::RestoreSessionSynchronously( |
659 Profile* profile, | 659 Profile* profile, |
660 const std::vector<GURL>& urls_to_open) { | 660 const std::vector<GURL>& urls_to_open) { |
661 Restore(profile, NULL, true, false, true, urls_to_open); | 661 Restore(profile, NULL, true, false, true, urls_to_open); |
662 } | 662 } |
663 | 663 |
664 // static | 664 // static |
665 bool SessionRestore::IsRestoring() { | 665 bool SessionRestore::IsRestoring() { |
666 return restoring; | 666 return restoring; |
667 } | 667 } |
OLD | NEW |