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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 delegate_->OnNativeWidgetSizeChanged(size_in_dip); | 730 delegate_->OnNativeWidgetSizeChanged(size_in_dip); |
731 } | 731 } |
732 | 732 |
733 void NativeWidgetWin::HandleFrameChanged() { | 733 void NativeWidgetWin::HandleFrameChanged() { |
734 // Replace the frame and layout the contents. | 734 // Replace the frame and layout the contents. |
735 GetWidget()->non_client_view()->UpdateFrame(true); | 735 GetWidget()->non_client_view()->UpdateFrame(true); |
736 } | 736 } |
737 | 737 |
738 void NativeWidgetWin::HandleNativeFocus(HWND last_focused_window) { | 738 void NativeWidgetWin::HandleNativeFocus(HWND last_focused_window) { |
739 delegate_->OnNativeFocus(last_focused_window); | 739 delegate_->OnNativeFocus(last_focused_window); |
| 740 InputMethod* input_method = GetInputMethod(); |
| 741 if (input_method) |
| 742 input_method->OnFocus(); |
740 } | 743 } |
741 | 744 |
742 void NativeWidgetWin::HandleNativeBlur(HWND focused_window) { | 745 void NativeWidgetWin::HandleNativeBlur(HWND focused_window) { |
743 delegate_->OnNativeBlur(focused_window); | 746 delegate_->OnNativeBlur(focused_window); |
| 747 InputMethod* input_method = GetInputMethod(); |
| 748 if (input_method) |
| 749 input_method->OnBlur(); |
744 } | 750 } |
745 | 751 |
746 bool NativeWidgetWin::HandleMouseEvent(const ui::MouseEvent& event) { | 752 bool NativeWidgetWin::HandleMouseEvent(const ui::MouseEvent& event) { |
747 static gfx::Transform scale_transform( | 753 static gfx::Transform scale_transform( |
748 1/ui::win::GetDeviceScaleFactor(), 0.0, | 754 1/ui::win::GetDeviceScaleFactor(), 0.0, |
749 0.0, 1/ui::win::GetDeviceScaleFactor(), | 755 0.0, 1/ui::win::GetDeviceScaleFactor(), |
750 0.0, 0.0); | 756 0.0, 0.0); |
751 if (event.IsMouseWheelEvent()) { | 757 if (event.IsMouseWheelEvent()) { |
752 ui::MouseWheelEvent dpi_event( | 758 ui::MouseWheelEvent dpi_event( |
753 static_cast<const ui::MouseWheelEvent&>(event)); | 759 static_cast<const ui::MouseWheelEvent&>(event)); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 // static | 1033 // static |
1028 bool NativeWidgetPrivate::IsTouchDown() { | 1034 bool NativeWidgetPrivate::IsTouchDown() { |
1029 // This currently isn't necessary because we're not generating touch events on | 1035 // This currently isn't necessary because we're not generating touch events on |
1030 // windows. When we do, this will need to be updated. | 1036 // windows. When we do, this will need to be updated. |
1031 return false; | 1037 return false; |
1032 } | 1038 } |
1033 | 1039 |
1034 } // namespace internal | 1040 } // namespace internal |
1035 | 1041 |
1036 } // namespace views | 1042 } // namespace views |
OLD | NEW |