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

Side by Side Diff: views/widget/widget_win.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
« no previous file with comments | « views/widget/widget_gtk.cc ('k') | views/window/dialog_client_view.cc » ('j') | 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) 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 "views/widget/widget_win.h" 5 #include "views/widget/widget_win.h"
6 6
7 #include "app/keyboard_code_conversion_win.h"
8 #include "app/l10n_util_win.h" 7 #include "app/l10n_util_win.h"
9 #include "app/system_monitor.h" 8 #include "app/system_monitor.h"
10 #include "app/view_prop.h" 9 #include "app/view_prop.h"
11 #include "app/win/hwnd_util.h" 10 #include "app/win/hwnd_util.h"
12 #include "app/win/win_util.h" 11 #include "app/win/win_util.h"
13 #include "base/string_util.h" 12 #include "base/string_util.h"
14 #include "gfx/canvas_skia.h" 13 #include "gfx/canvas_skia.h"
15 #include "gfx/native_theme_win.h" 14 #include "gfx/native_theme_win.h"
16 #include "gfx/path.h" 15 #include "gfx/path.h"
16 #include "ui/base/keycodes/keyboard_code_conversion_win.h"
17 #include "views/accessibility/view_accessibility.h" 17 #include "views/accessibility/view_accessibility.h"
18 #include "views/controls/native_control_win.h" 18 #include "views/controls/native_control_win.h"
19 #include "views/focus/focus_util_win.h" 19 #include "views/focus/focus_util_win.h"
20 #include "views/views_delegate.h" 20 #include "views/views_delegate.h"
21 #include "views/widget/aero_tooltip_manager.h" 21 #include "views/widget/aero_tooltip_manager.h"
22 #include "views/widget/child_window_message_processor.h" 22 #include "views/widget/child_window_message_processor.h"
23 #include "views/widget/default_theme_provider.h" 23 #include "views/widget/default_theme_provider.h"
24 #include "views/widget/drop_target_win.h" 24 #include "views/widget/drop_target_win.h"
25 #include "views/widget/root_view.h" 25 #include "views/widget/root_view.h"
26 #include "views/widget/widget_delegate.h" 26 #include "views/widget/widget_delegate.h"
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 SetMsgHandled(FALSE); 654 SetMsgHandled(FALSE);
655 } 655 }
656 656
657 void WidgetWin::OnInitMenuPopup(HMENU menu, 657 void WidgetWin::OnInitMenuPopup(HMENU menu,
658 UINT position, 658 UINT position,
659 BOOL is_system_menu) { 659 BOOL is_system_menu) {
660 SetMsgHandled(FALSE); 660 SetMsgHandled(FALSE);
661 } 661 }
662 662
663 void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) { 663 void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) {
664 KeyEvent event(Event::ET_KEY_PRESSED, app::KeyboardCodeForWindowsKeyCode(c), 664 KeyEvent event(Event::ET_KEY_PRESSED, ui::KeyboardCodeForWindowsKeyCode(c),
665 KeyEvent::GetKeyStateFlags(), rep_cnt, flags, 665 KeyEvent::GetKeyStateFlags(), rep_cnt, flags,
666 WM_KEYDOWN); 666 WM_KEYDOWN);
667 RootView* root_view = GetFocusedViewRootView(); 667 RootView* root_view = GetFocusedViewRootView();
668 if (!root_view) 668 if (!root_view)
669 root_view = root_view_.get(); 669 root_view = root_view_.get();
670 670
671 SetMsgHandled(root_view->ProcessKeyEvent(event)); 671 SetMsgHandled(root_view->ProcessKeyEvent(event));
672 } 672 }
673 673
674 void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) { 674 void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) {
675 KeyEvent event(Event::ET_KEY_RELEASED, app::KeyboardCodeForWindowsKeyCode(c), 675 KeyEvent event(Event::ET_KEY_RELEASED, ui::KeyboardCodeForWindowsKeyCode(c),
676 KeyEvent::GetKeyStateFlags(), rep_cnt, flags, 676 KeyEvent::GetKeyStateFlags(), rep_cnt, flags,
677 WM_KEYUP); 677 WM_KEYUP);
678 RootView* root_view = GetFocusedViewRootView(); 678 RootView* root_view = GetFocusedViewRootView();
679 if (!root_view) 679 if (!root_view)
680 root_view = root_view_.get(); 680 root_view = root_view_.get();
681 681
682 SetMsgHandled(root_view->ProcessKeyEvent(event)); 682 SetMsgHandled(root_view->ProcessKeyEvent(event));
683 } 683 }
684 684
685 void WidgetWin::OnKillFocus(HWND focused_window) { 685 void WidgetWin::OnKillFocus(HWND focused_window) {
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { 1357 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) {
1358 return Widget::GetWidgetFromNativeView(native_window); 1358 return Widget::GetWidgetFromNativeView(native_window);
1359 } 1359 }
1360 1360
1361 // static 1361 // static
1362 void Widget::NotifyLocaleChanged() { 1362 void Widget::NotifyLocaleChanged() {
1363 NOTIMPLEMENTED(); 1363 NOTIMPLEMENTED();
1364 } 1364 }
1365 1365
1366 } // namespace views 1366 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/widget_gtk.cc ('k') | views/window/dialog_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698