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

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

Issue 6246001: Move app/key* to ui/base/keycodes/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/i18n/number_formatting.h" 9 #include "base/i18n/number_formatting.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 //////////////////////////////////////////////////////////////////////////////// 453 ////////////////////////////////////////////////////////////////////////////////
454 // ToolbarView, menus::AcceleratorProvider implementation: 454 // ToolbarView, menus::AcceleratorProvider implementation:
455 455
456 bool ToolbarView::GetAcceleratorForCommandId(int command_id, 456 bool ToolbarView::GetAcceleratorForCommandId(int command_id,
457 menus::Accelerator* accelerator) { 457 menus::Accelerator* accelerator) {
458 // The standard Ctrl-X, Ctrl-V and Ctrl-C are not defined as accelerators 458 // The standard Ctrl-X, Ctrl-V and Ctrl-C are not defined as accelerators
459 // anywhere so we need to check for them explicitly here. 459 // anywhere so we need to check for them explicitly here.
460 // TODO(cpu) Bug 1109102. Query WebKit land for the actual bindings. 460 // TODO(cpu) Bug 1109102. Query WebKit land for the actual bindings.
461 switch (command_id) { 461 switch (command_id) {
462 case IDC_CUT: 462 case IDC_CUT:
463 *accelerator = views::Accelerator(app::VKEY_X, false, true, false); 463 *accelerator = views::Accelerator(ui::VKEY_X, false, true, false);
464 return true; 464 return true;
465 case IDC_COPY: 465 case IDC_COPY:
466 *accelerator = views::Accelerator(app::VKEY_C, false, true, false); 466 *accelerator = views::Accelerator(ui::VKEY_C, false, true, false);
467 return true; 467 return true;
468 case IDC_PASTE: 468 case IDC_PASTE:
469 *accelerator = views::Accelerator(app::VKEY_V, false, true, false); 469 *accelerator = views::Accelerator(ui::VKEY_V, false, true, false);
470 return true; 470 return true;
471 } 471 }
472 // Else, we retrieve the accelerator information from the frame. 472 // Else, we retrieve the accelerator information from the frame.
473 return GetWidget()->GetAccelerator(command_id, accelerator); 473 return GetWidget()->GetAccelerator(command_id, accelerator);
474 } 474 }
475 475
476 //////////////////////////////////////////////////////////////////////////////// 476 ////////////////////////////////////////////////////////////////////////////////
477 // ToolbarView, views::View overrides: 477 // ToolbarView, views::View overrides:
478 478
479 gfx::Size ToolbarView::GetPreferredSize() { 479 gfx::Size ToolbarView::GetPreferredSize() {
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 NOTREACHED(); 771 NOTREACHED();
772 #endif 772 #endif
773 } else { 773 } else {
774 NOTREACHED(); 774 NOTREACHED();
775 } 775 }
776 776
777 canvas->DrawBitmapInt(badge, icon.width() - badge.width(), kBadgeTopMargin); 777 canvas->DrawBitmapInt(badge, icon.width() - badge.width(), kBadgeTopMargin);
778 778
779 return canvas->ExtractBitmap(); 779 return canvas->ExtractBitmap();
780 } 780 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | chrome/browser/ui/views/unhandled_keyboard_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698