| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/views/toolbar_view.h" | 5 #include "chrome/browser/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/drag_drop_types.h" | 9 #include "app/drag_drop_types.h" |
| 10 #include "app/gfx/canvas.h" | 10 #include "app/gfx/canvas.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 if (profile == profile_) | 211 if (profile == profile_) |
| 212 return; | 212 return; |
| 213 | 213 |
| 214 profile_ = profile; | 214 profile_ = profile; |
| 215 location_bar_->SetProfile(profile); | 215 location_bar_->SetProfile(profile); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void ToolbarView::Update(TabContents* tab, bool should_restore_state) { | 218 void ToolbarView::Update(TabContents* tab, bool should_restore_state) { |
| 219 if (location_bar_) | 219 if (location_bar_) |
| 220 location_bar_->Update(should_restore_state ? tab : NULL); | 220 location_bar_->Update(should_restore_state ? tab : NULL); |
| 221 |
| 222 if (browser_actions_) |
| 223 browser_actions_->RefreshBrowserActionViews(); |
| 221 } | 224 } |
| 222 | 225 |
| 223 int ToolbarView::GetNextAccessibleViewIndex(int view_index, bool nav_left) { | 226 int ToolbarView::GetNextAccessibleViewIndex(int view_index, bool nav_left) { |
| 224 int modifier = 1; | 227 int modifier = 1; |
| 225 | 228 |
| 226 if (nav_left) | 229 if (nav_left) |
| 227 modifier = -1; | 230 modifier = -1; |
| 228 | 231 |
| 229 int current_view_index = view_index + modifier; | 232 int current_view_index = view_index + modifier; |
| 230 | 233 |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 app_menu_contents_->AddItem(IDC_ABOUT, | 1201 app_menu_contents_->AddItem(IDC_ABOUT, |
| 1199 l10n_util::GetStringFUTF16( | 1202 l10n_util::GetStringFUTF16( |
| 1200 IDS_ABOUT, | 1203 IDS_ABOUT, |
| 1201 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); | 1204 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); |
| 1202 app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE); | 1205 app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE); |
| 1203 app_menu_contents_->AddSeparator(); | 1206 app_menu_contents_->AddSeparator(); |
| 1204 app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT); | 1207 app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT); |
| 1205 | 1208 |
| 1206 app_menu_menu_.reset(new views::Menu2(app_menu_contents_.get())); | 1209 app_menu_menu_.reset(new views::Menu2(app_menu_contents_.get())); |
| 1207 } | 1210 } |
| OLD | NEW |