OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/toolbar_view.h" | 5 #include "chrome/browser/ui/views/toolbar_view.h" |
6 | 6 |
7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
483 switch (command_id) { | 483 switch (command_id) { |
484 case IDC_CUT: | 484 case IDC_CUT: |
485 *accelerator = ui::Accelerator(ui::VKEY_X, false, true, false); | 485 *accelerator = ui::Accelerator(ui::VKEY_X, false, true, false); |
486 return true; | 486 return true; |
487 case IDC_COPY: | 487 case IDC_COPY: |
488 *accelerator = ui::Accelerator(ui::VKEY_C, false, true, false); | 488 *accelerator = ui::Accelerator(ui::VKEY_C, false, true, false); |
489 return true; | 489 return true; |
490 case IDC_PASTE: | 490 case IDC_PASTE: |
491 *accelerator = ui::Accelerator(ui::VKEY_V, false, true, false); | 491 *accelerator = ui::Accelerator(ui::VKEY_V, false, true, false); |
492 return true; | 492 return true; |
493 #if defined(USE_ASH) | |
mazda
2012/04/24 19:34:06
Could you add a note saying that these accelerator
Yusuke Sato
2012/04/25 01:27:30
Done.
| |
494 case IDC_NEW_WINDOW: // for crbug.com/120196 | |
495 *accelerator = ui::Accelerator(ui::VKEY_N, false, true, false); | |
496 return true; | |
497 case IDC_NEW_INCOGNITO_WINDOW: // for crbug.com/120196 | |
498 *accelerator = ui::Accelerator(ui::VKEY_N, true, true, false); | |
499 return true; | |
500 #endif | |
493 } | 501 } |
494 // Else, we retrieve the accelerator information from the frame. | 502 // Else, we retrieve the accelerator information from the frame. |
495 return GetWidget()->GetAccelerator(command_id, accelerator); | 503 return GetWidget()->GetAccelerator(command_id, accelerator); |
496 } | 504 } |
497 | 505 |
498 //////////////////////////////////////////////////////////////////////////////// | 506 //////////////////////////////////////////////////////////////////////////////// |
499 // ToolbarView, views::View overrides: | 507 // ToolbarView, views::View overrides: |
500 | 508 |
501 gfx::Size ToolbarView::GetPreferredSize() { | 509 gfx::Size ToolbarView::GetPreferredSize() { |
502 if (IsDisplayModeNormal()) { | 510 if (IsDisplayModeNormal()) { |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
783 accname_app = l10n_util::GetStringFUTF16( | 791 accname_app = l10n_util::GetStringFUTF16( |
784 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); | 792 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); |
785 } | 793 } |
786 app_menu_->SetAccessibleName(accname_app); | 794 app_menu_->SetAccessibleName(accname_app); |
787 | 795 |
788 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); | 796 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); |
789 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); | 797 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); |
790 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); | 798 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); |
791 SchedulePaint(); | 799 SchedulePaint(); |
792 } | 800 } |
OLD | NEW |