OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/browser.h" | 5 #include "chrome/browser/browser.h" |
6 | 6 |
7 #include "app/animation.h" | 7 #include "app/animation.h" |
8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/idle_timer.h" | 10 #include "base/idle_timer.h" |
(...skipping 2473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2484 | 2484 |
2485 // Updating the URL happens synchronously in ScheduleUIUpdate. | 2485 // Updating the URL happens synchronously in ScheduleUIUpdate. |
2486 TabContents* selected_tab = GetSelectedTabContents(); | 2486 TabContents* selected_tab = GetSelectedTabContents(); |
2487 if (selected_tab && | 2487 if (selected_tab && |
2488 flags & TabContents::INVALIDATE_LOAD && GetStatusBubble()) { | 2488 flags & TabContents::INVALIDATE_LOAD && GetStatusBubble()) { |
2489 GetStatusBubble()->SetStatus(selected_tab->GetStatusText()); | 2489 GetStatusBubble()->SetStatus(selected_tab->GetStatusText()); |
2490 } | 2490 } |
2491 | 2491 |
2492 if (flags & TabContents::INVALIDATE_TAB) { | 2492 if (flags & TabContents::INVALIDATE_TAB) { |
2493 tabstrip_model_.UpdateTabContentsStateAt( | 2493 tabstrip_model_.UpdateTabContentsStateAt( |
2494 tabstrip_model_.GetIndexOfController(&contents->controller()), false); | 2494 tabstrip_model_.GetIndexOfTabContents(contents), false); |
2495 window_->UpdateTitleBar(); | 2495 window_->UpdateTitleBar(); |
2496 | 2496 |
2497 if (selected_tab && contents == selected_tab) { | 2497 if (selected_tab && contents == selected_tab) { |
2498 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, | 2498 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, |
2499 !selected_tab->GetFavIcon().isNull()); | 2499 !selected_tab->GetFavIcon().isNull()); |
2500 } | 2500 } |
2501 } | 2501 } |
2502 | 2502 |
2503 // We don't need to process INVALIDATE_STATE, since that's not visible. | 2503 // We don't need to process INVALIDATE_STATE, since that's not visible. |
2504 } | 2504 } |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2891 /////////////////////////////////////////////////////////////////////////////// | 2891 /////////////////////////////////////////////////////////////////////////////// |
2892 // BrowserToolbarModel (private): | 2892 // BrowserToolbarModel (private): |
2893 | 2893 |
2894 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 2894 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
2895 // This |current_tab| can be NULL during the initialization of the | 2895 // This |current_tab| can be NULL during the initialization of the |
2896 // toolbar during window creation (i.e. before any tabs have been added | 2896 // toolbar during window creation (i.e. before any tabs have been added |
2897 // to the window). | 2897 // to the window). |
2898 TabContents* current_tab = browser_->GetSelectedTabContents(); | 2898 TabContents* current_tab = browser_->GetSelectedTabContents(); |
2899 return current_tab ? ¤t_tab->controller() : NULL; | 2899 return current_tab ? ¤t_tab->controller() : NULL; |
2900 } | 2900 } |
OLD | NEW |