Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 10155022: Add back accelerator labels for C-n and C-S-n to the wrench menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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)
494 // When USE_ASH is defined, IDC_NEW_WINDOW and IDC_NEW_INCOGNITO_WINDOW are
495 // handled outside Chrome, in ash/accelerators/accelerator_table.cc.
496 // crbug.com/120196
497 case IDC_NEW_WINDOW:
498 *accelerator = ui::Accelerator(ui::VKEY_N, false, true, false);
499 return true;
500 case IDC_NEW_INCOGNITO_WINDOW:
501 *accelerator = ui::Accelerator(ui::VKEY_N, true, true, false);
502 return true;
503 #endif
493 } 504 }
494 // Else, we retrieve the accelerator information from the frame. 505 // Else, we retrieve the accelerator information from the frame.
495 return GetWidget()->GetAccelerator(command_id, accelerator); 506 return GetWidget()->GetAccelerator(command_id, accelerator);
496 } 507 }
497 508
498 //////////////////////////////////////////////////////////////////////////////// 509 ////////////////////////////////////////////////////////////////////////////////
499 // ToolbarView, views::View overrides: 510 // ToolbarView, views::View overrides:
500 511
501 gfx::Size ToolbarView::GetPreferredSize() { 512 gfx::Size ToolbarView::GetPreferredSize() {
502 if (IsDisplayModeNormal()) { 513 if (IsDisplayModeNormal()) {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 accname_app = l10n_util::GetStringFUTF16( 794 accname_app = l10n_util::GetStringFUTF16(
784 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); 795 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app);
785 } 796 }
786 app_menu_->SetAccessibleName(accname_app); 797 app_menu_->SetAccessibleName(accname_app);
787 798
788 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL)); 799 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::BS_NORMAL));
789 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT)); 800 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::BS_HOT));
790 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED)); 801 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::BS_PUSHED));
791 SchedulePaint(); 802 SchedulePaint();
792 } 803 }
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698