| OLD | NEW |
| 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" | 7 #include "app/keyboard_code_conversion_win.h" |
| 8 #include "app/l10n_util_win.h" | 8 #include "app/l10n_util_win.h" |
| 9 #include "app/system_monitor.h" | 9 #include "app/system_monitor.h" |
| 10 #include "app/view_prop.h" | 10 #include "app/view_prop.h" |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, app::KeyboardCodeForWindowsKeyCode(c), |
| 665 KeyEvent::GetKeyStateFlags(), rep_cnt, flags); | 665 KeyEvent::GetKeyStateFlags(), rep_cnt, flags, |
| 666 WM_KEYDOWN); |
| 666 RootView* root_view = GetFocusedViewRootView(); | 667 RootView* root_view = GetFocusedViewRootView(); |
| 667 if (!root_view) | 668 if (!root_view) |
| 668 root_view = root_view_.get(); | 669 root_view = root_view_.get(); |
| 669 | 670 |
| 670 SetMsgHandled(root_view->ProcessKeyEvent(event)); | 671 SetMsgHandled(root_view->ProcessKeyEvent(event)); |
| 671 } | 672 } |
| 672 | 673 |
| 673 void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) { | 674 void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) { |
| 674 KeyEvent event(Event::ET_KEY_RELEASED, app::KeyboardCodeForWindowsKeyCode(c), | 675 KeyEvent event(Event::ET_KEY_RELEASED, app::KeyboardCodeForWindowsKeyCode(c), |
| 675 KeyEvent::GetKeyStateFlags(), rep_cnt, flags); | 676 KeyEvent::GetKeyStateFlags(), rep_cnt, flags, |
| 677 WM_KEYUP); |
| 676 RootView* root_view = GetFocusedViewRootView(); | 678 RootView* root_view = GetFocusedViewRootView(); |
| 677 if (!root_view) | 679 if (!root_view) |
| 678 root_view = root_view_.get(); | 680 root_view = root_view_.get(); |
| 679 | 681 |
| 680 SetMsgHandled(root_view->ProcessKeyEvent(event)); | 682 SetMsgHandled(root_view->ProcessKeyEvent(event)); |
| 681 } | 683 } |
| 682 | 684 |
| 683 void WidgetWin::OnKillFocus(HWND focused_window) { | 685 void WidgetWin::OnKillFocus(HWND focused_window) { |
| 684 GetFocusManager()->GetWidgetFocusManager()->OnWidgetFocusEvent( | 686 GetFocusManager()->GetWidgetFocusManager()->OnWidgetFocusEvent( |
| 685 this->GetNativeView(), | 687 this->GetNativeView(), |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { | 1357 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { |
| 1356 return Widget::GetWidgetFromNativeView(native_window); | 1358 return Widget::GetWidgetFromNativeView(native_window); |
| 1357 } | 1359 } |
| 1358 | 1360 |
| 1359 // static | 1361 // static |
| 1360 void Widget::NotifyLocaleChanged() { | 1362 void Widget::NotifyLocaleChanged() { |
| 1361 NOTIMPLEMENTED(); | 1363 NOTIMPLEMENTED(); |
| 1362 } | 1364 } |
| 1363 | 1365 |
| 1364 } // namespace views | 1366 } // namespace views |
| OLD | NEW |