OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/session_service.h" | 5 #include "chrome/browser/session_service.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 case NOTIFY_NAV_LIST_PRUNED: | 418 case NOTIFY_NAV_LIST_PRUNED: |
419 TabNavigationPathPruned(controller->window_id(), controller->session_id(), | 419 TabNavigationPathPruned(controller->window_id(), controller->session_id(), |
420 controller->GetEntryCount()); | 420 controller->GetEntryCount()); |
421 break; | 421 break; |
422 case NOTIFY_NAV_ENTRY_CHANGED: { | 422 case NOTIFY_NAV_ENTRY_CHANGED: { |
423 Details<NavigationController::EntryChangedDetails> changed(details); | 423 Details<NavigationController::EntryChangedDetails> changed(details); |
424 UpdateTabNavigation(controller->window_id(), controller->session_id(), | 424 UpdateTabNavigation(controller->window_id(), controller->session_id(), |
425 changed->index, *changed->changed_entry); | 425 changed->index, *changed->changed_entry); |
426 break; | 426 break; |
427 } | 427 } |
428 case NOTIFY_NAV_ENTRY_COMMITTED: | 428 case NOTIFY_NAV_ENTRY_COMMITTED: { |
| 429 int current_entry_index = controller->GetCurrentEntryIndex(); |
429 SetSelectedNavigationIndex(controller->window_id(), | 430 SetSelectedNavigationIndex(controller->window_id(), |
430 controller->session_id(), | 431 controller->session_id(), |
431 controller->GetCurrentEntryIndex()); | 432 current_entry_index); |
| 433 UpdateTabNavigation(controller->window_id(), controller->session_id(), |
| 434 current_entry_index, |
| 435 *controller->GetEntryAtIndex(current_entry_index)); |
432 break; | 436 break; |
| 437 } |
433 default: | 438 default: |
434 NOTREACHED(); | 439 NOTREACHED(); |
435 } | 440 } |
436 } | 441 } |
437 | 442 |
438 SessionService::Handle SessionService::GetSessionImpl( | 443 SessionService::Handle SessionService::GetSessionImpl( |
439 CancelableRequestConsumerBase* consumer, | 444 CancelableRequestConsumerBase* consumer, |
440 SavedSessionCallback* callback, | 445 SavedSessionCallback* callback, |
441 bool is_saved_session) { | 446 bool is_saved_session) { |
442 scoped_refptr<InternalSavedSessionRequest> request( | 447 scoped_refptr<InternalSavedSessionRequest> request( |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 bool SessionService::ShouldTrackChangesToWindow(const SessionID& window_id) { | 1141 bool SessionService::ShouldTrackChangesToWindow(const SessionID& window_id) { |
1137 return windows_tracking_.find(window_id.id()) != windows_tracking_.end(); | 1142 return windows_tracking_.find(window_id.id()) != windows_tracking_.end(); |
1138 } | 1143 } |
1139 | 1144 |
1140 // InternalSavedSessionRequest ------------------------------------------------ | 1145 // InternalSavedSessionRequest ------------------------------------------------ |
1141 | 1146 |
1142 SessionService::InternalSavedSessionRequest::~InternalSavedSessionRequest() { | 1147 SessionService::InternalSavedSessionRequest::~InternalSavedSessionRequest() { |
1143 STLDeleteElements(&commands); | 1148 STLDeleteElements(&commands); |
1144 } | 1149 } |
1145 | 1150 |
OLD | NEW |