| 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/views/toolbar_view.h" | 5 #include "chrome/browser/views/toolbar_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 357 } |
| 358 } else if (type == NotificationType::UPGRADE_RECOMMENDED) { | 358 } else if (type == NotificationType::UPGRADE_RECOMMENDED) { |
| 359 ShowUpgradeReminder(); | 359 ShowUpgradeReminder(); |
| 360 } | 360 } |
| 361 } | 361 } |
| 362 | 362 |
| 363 //////////////////////////////////////////////////////////////////////////////// | 363 //////////////////////////////////////////////////////////////////////////////// |
| 364 // ToolbarView, menus::SimpleMenuModel::Delegate implementation: | 364 // ToolbarView, menus::SimpleMenuModel::Delegate implementation: |
| 365 | 365 |
| 366 bool ToolbarView::IsCommandIdChecked(int command_id) const { | 366 bool ToolbarView::IsCommandIdChecked(int command_id) const { |
| 367 #if defined(OS_CHROMEOS) |
| 368 if (command_id == IDC_TOGGLE_VERTICAL_TABS) { |
| 369 return browser_->UseVerticalTabs(); |
| 370 } |
| 371 #endif |
| 367 return (command_id == IDC_SHOW_BOOKMARK_BAR) && | 372 return (command_id == IDC_SHOW_BOOKMARK_BAR) && |
| 368 profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); | 373 profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); |
| 369 } | 374 } |
| 370 | 375 |
| 371 bool ToolbarView::IsCommandIdEnabled(int command_id) const { | 376 bool ToolbarView::IsCommandIdEnabled(int command_id) const { |
| 372 return browser_->command_updater()->IsCommandEnabled(command_id); | 377 return browser_->command_updater()->IsCommandEnabled(command_id); |
| 373 } | 378 } |
| 374 | 379 |
| 375 bool ToolbarView::GetAcceleratorForCommandId(int command_id, | 380 bool ToolbarView::GetAcceleratorForCommandId(int command_id, |
| 376 menus::Accelerator* accelerator) { | 381 menus::Accelerator* accelerator) { |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 } | 687 } |
| 683 #endif | 688 #endif |
| 684 | 689 |
| 685 // Tell the menu button to activate, opening its pop-up menu. | 690 // Tell the menu button to activate, opening its pop-up menu. |
| 686 menu_button->Activate(); | 691 menu_button->Activate(); |
| 687 | 692 |
| 688 #if defined(OS_WIN) | 693 #if defined(OS_WIN) |
| 689 SetToolbarFocus(NULL, menu_button); | 694 SetToolbarFocus(NULL, menu_button); |
| 690 #endif | 695 #endif |
| 691 } | 696 } |
| OLD | NEW |