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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 } | 753 } |
754 | 754 |
755 void NativeWidgetWin::HandleNativeBlur(HWND focused_window) { | 755 void NativeWidgetWin::HandleNativeBlur(HWND focused_window) { |
756 delegate_->OnNativeBlur(focused_window); | 756 delegate_->OnNativeBlur(focused_window); |
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 delegate_->OnMouseEvent(const_cast<ui::MouseEvent*>(&event)); |
| 764 return event.handled(); |
764 } | 765 } |
765 | 766 |
766 bool NativeWidgetWin::HandleKeyEvent(const ui::KeyEvent& event) { | 767 bool NativeWidgetWin::HandleKeyEvent(const ui::KeyEvent& event) { |
767 delegate_->OnKeyEvent(const_cast<ui::KeyEvent*>(&event)); | 768 delegate_->OnKeyEvent(const_cast<ui::KeyEvent*>(&event)); |
768 return event.handled(); | 769 return event.handled(); |
769 } | 770 } |
770 | 771 |
771 bool NativeWidgetWin::HandleUntranslatedKeyEvent(const ui::KeyEvent& event) { | 772 bool NativeWidgetWin::HandleUntranslatedKeyEvent(const ui::KeyEvent& event) { |
772 InputMethod* input_method = GetInputMethod(); | 773 InputMethod* input_method = GetInputMethod(); |
773 if (input_method) | 774 if (input_method) |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 // static | 1025 // static |
1025 bool NativeWidgetPrivate::IsTouchDown() { | 1026 bool NativeWidgetPrivate::IsTouchDown() { |
1026 // This currently isn't necessary because we're not generating touch events on | 1027 // This currently isn't necessary because we're not generating touch events on |
1027 // windows. When we do, this will need to be updated. | 1028 // windows. When we do, this will need to be updated. |
1028 return false; | 1029 return false; |
1029 } | 1030 } |
1030 | 1031 |
1031 } // namespace internal | 1032 } // namespace internal |
1032 | 1033 |
1033 } // namespace views | 1034 } // namespace views |
OLD | NEW |