OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 case IDC_NEW_WINDOW: | 589 case IDC_NEW_WINDOW: |
590 *accelerator = ui::Accelerator(ui::VKEY_N, ui::EF_CONTROL_DOWN); | 590 *accelerator = ui::Accelerator(ui::VKEY_N, ui::EF_CONTROL_DOWN); |
591 return true; | 591 return true; |
592 case IDC_NEW_INCOGNITO_WINDOW: | 592 case IDC_NEW_INCOGNITO_WINDOW: |
593 *accelerator = ui::Accelerator(ui::VKEY_N, | 593 *accelerator = ui::Accelerator(ui::VKEY_N, |
594 ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); | 594 ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); |
595 return true; | 595 return true; |
596 case IDC_TASK_MANAGER: | 596 case IDC_TASK_MANAGER: |
597 *accelerator = ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN); | 597 *accelerator = ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN); |
598 return true; | 598 return true; |
| 599 case IDC_FEEDBACK: |
| 600 *accelerator = ui::Accelerator(ui::VKEY_I, |
| 601 ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN); |
| 602 return true; |
599 #endif | 603 #endif |
600 } | 604 } |
601 // Else, we retrieve the accelerator information from the frame. | 605 // Else, we retrieve the accelerator information from the frame. |
602 return GetWidget()->GetAccelerator(command_id, accelerator); | 606 return GetWidget()->GetAccelerator(command_id, accelerator); |
603 } | 607 } |
604 | 608 |
605 //////////////////////////////////////////////////////////////////////////////// | 609 //////////////////////////////////////////////////////////////////////////////// |
606 // ToolbarView, views::View overrides: | 610 // ToolbarView, views::View overrides: |
607 | 611 |
608 gfx::Size ToolbarView::GetPreferredSize() { | 612 gfx::Size ToolbarView::GetPreferredSize() { |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::STATE_NORMAL)); | 904 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::STATE_NORMAL)); |
901 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::STATE_HOVERED)); | 905 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::STATE_HOVERED)); |
902 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::STATE_PRESSED)); | 906 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::STATE_PRESSED)); |
903 SchedulePaint(); | 907 SchedulePaint(); |
904 } | 908 } |
905 | 909 |
906 void ToolbarView::OnShowHomeButtonChanged() { | 910 void ToolbarView::OnShowHomeButtonChanged() { |
907 Layout(); | 911 Layout(); |
908 SchedulePaint(); | 912 SchedulePaint(); |
909 } | 913 } |
OLD | NEW |