| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 0, | 511 0, |
| 512 std::min(selected_index, | 512 std::min(selected_index, |
| 513 static_cast<int>(tab.navigations.size() - 1))); | 513 static_cast<int>(tab.navigations.size() - 1))); |
| 514 tab_loader_->ScheduleLoad( | 514 tab_loader_->ScheduleLoad( |
| 515 &browser->AddRestoredTab(tab.navigations, | 515 &browser->AddRestoredTab(tab.navigations, |
| 516 static_cast<int>(i - window.tabs.begin()), | 516 static_cast<int>(i - window.tabs.begin()), |
| 517 selected_index, | 517 selected_index, |
| 518 tab.extension_app_id, | 518 tab.extension_app_id, |
| 519 false, | 519 false, |
| 520 tab.pinned, | 520 tab.pinned, |
| 521 true)->controller()); | 521 true, |
| 522 NULL)->controller()); |
| 522 } | 523 } |
| 523 } | 524 } |
| 524 | 525 |
| 525 void ShowBrowser(Browser* browser, | 526 void ShowBrowser(Browser* browser, |
| 526 int initial_tab_count, | 527 int initial_tab_count, |
| 527 int selected_session_index) { | 528 int selected_session_index) { |
| 528 if (browser_ == browser) { | 529 if (browser_ == browser) { |
| 529 browser->SelectTabContentsAt(browser->tab_count() - 1, true); | 530 browser->SelectTabContentsAt(browser->tab_count() - 1, true); |
| 530 return; | 531 return; |
| 531 } | 532 } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 void SessionRestore::RestoreSessionSynchronously( | 655 void SessionRestore::RestoreSessionSynchronously( |
| 655 Profile* profile, | 656 Profile* profile, |
| 656 const std::vector<GURL>& urls_to_open) { | 657 const std::vector<GURL>& urls_to_open) { |
| 657 Restore(profile, NULL, true, false, true, urls_to_open); | 658 Restore(profile, NULL, true, false, true, urls_to_open); |
| 658 } | 659 } |
| 659 | 660 |
| 660 // static | 661 // static |
| 661 bool SessionRestore::IsRestoring() { | 662 bool SessionRestore::IsRestoring() { |
| 662 return restoring; | 663 return restoring; |
| 663 } | 664 } |
| OLD | NEW |