OLD | NEW |
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 "ui/views/widget/native_widget_win.h" | 5 #include "ui/views/widget/native_widget_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 InputMethod* input_method = GetInputMethod(); | 757 InputMethod* input_method = GetInputMethod(); |
758 if (input_method) | 758 if (input_method) |
759 input_method->OnBlur(); | 759 input_method->OnBlur(); |
760 } | 760 } |
761 | 761 |
762 bool NativeWidgetWin::HandleMouseEvent(const ui::MouseEvent& event) { | 762 bool NativeWidgetWin::HandleMouseEvent(const ui::MouseEvent& event) { |
763 return delegate_->OnMouseEvent(event); | 763 return delegate_->OnMouseEvent(event); |
764 } | 764 } |
765 | 765 |
766 bool NativeWidgetWin::HandleKeyEvent(const ui::KeyEvent& event) { | 766 bool NativeWidgetWin::HandleKeyEvent(const ui::KeyEvent& event) { |
767 return delegate_->OnKeyEvent(event); | 767 delegate_->OnKeyEvent(const_cast<ui::KeyEvent*>(&event)); |
| 768 return event.handled(); |
768 } | 769 } |
769 | 770 |
770 bool NativeWidgetWin::HandleUntranslatedKeyEvent(const ui::KeyEvent& event) { | 771 bool NativeWidgetWin::HandleUntranslatedKeyEvent(const ui::KeyEvent& event) { |
771 InputMethod* input_method = GetInputMethod(); | 772 InputMethod* input_method = GetInputMethod(); |
772 if (input_method) | 773 if (input_method) |
773 input_method->DispatchKeyEvent(event); | 774 input_method->DispatchKeyEvent(event); |
774 return !!input_method; | 775 return !!input_method; |
775 } | 776 } |
776 | 777 |
777 bool NativeWidgetWin::HandleIMEMessage(UINT message, | 778 bool NativeWidgetWin::HandleIMEMessage(UINT message, |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 // static | 1024 // static |
1024 bool NativeWidgetPrivate::IsTouchDown() { | 1025 bool NativeWidgetPrivate::IsTouchDown() { |
1025 // This currently isn't necessary because we're not generating touch events on | 1026 // This currently isn't necessary because we're not generating touch events on |
1026 // windows. When we do, this will need to be updated. | 1027 // windows. When we do, this will need to be updated. |
1027 return false; | 1028 return false; |
1028 } | 1029 } |
1029 | 1030 |
1030 } // namespace internal | 1031 } // namespace internal |
1031 | 1032 |
1032 } // namespace views | 1033 } // namespace views |
OLD | NEW |