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/win/hwnd_message_handler.h" | 5 #include "ui/views/win/hwnd_message_handler.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <oleacc.h> | 8 #include <oleacc.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #include <tchar.h> | 10 #include <tchar.h> |
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2137 | 2137 |
2138 void HWNDMessageHandler::OnThemeChanged() { | 2138 void HWNDMessageHandler::OnThemeChanged() { |
2139 ui::NativeThemeWin::instance()->CloseHandles(); | 2139 ui::NativeThemeWin::instance()->CloseHandles(); |
2140 } | 2140 } |
2141 | 2141 |
2142 LRESULT HWNDMessageHandler::OnTouchEvent(UINT message, | 2142 LRESULT HWNDMessageHandler::OnTouchEvent(UINT message, |
2143 WPARAM w_param, | 2143 WPARAM w_param, |
2144 LPARAM l_param) { | 2144 LPARAM l_param) { |
2145 // Handle touch events only on Aura for now. | 2145 // Handle touch events only on Aura for now. |
2146 int num_points = LOWORD(w_param); | 2146 int num_points = LOWORD(w_param); |
2147 scoped_ptr<TOUCHINPUT[]> input(new TOUCHINPUT[num_points]); | 2147 std::unique_ptr<TOUCHINPUT[]> input(new TOUCHINPUT[num_points]); |
2148 if (ui::GetTouchInputInfoWrapper(reinterpret_cast<HTOUCHINPUT>(l_param), | 2148 if (ui::GetTouchInputInfoWrapper(reinterpret_cast<HTOUCHINPUT>(l_param), |
2149 num_points, input.get(), | 2149 num_points, input.get(), |
2150 sizeof(TOUCHINPUT))) { | 2150 sizeof(TOUCHINPUT))) { |
2151 // input[i].dwTime doesn't necessarily relate to the system time at all, | 2151 // input[i].dwTime doesn't necessarily relate to the system time at all, |
2152 // so use base::TimeTicks::Now(). | 2152 // so use base::TimeTicks::Now(). |
2153 const base::TimeTicks event_time = base::TimeTicks::Now(); | 2153 const base::TimeTicks event_time = base::TimeTicks::Now(); |
2154 TouchEvents touch_events; | 2154 TouchEvents touch_events; |
2155 for (int i = 0; i < num_points; ++i) { | 2155 for (int i = 0; i < num_points; ++i) { |
2156 POINT point; | 2156 POINT point; |
2157 point.x = TOUCH_COORD_TO_PIXEL(input[i].x); | 2157 point.x = TOUCH_COORD_TO_PIXEL(input[i].x); |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2669 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size()); | 2669 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size()); |
2670 ResetWindowRegion(false, true); | 2670 ResetWindowRegion(false, true); |
2671 } | 2671 } |
2672 | 2672 |
2673 if (direct_manipulation_helper_) | 2673 if (direct_manipulation_helper_) |
2674 direct_manipulation_helper_->SetBounds(bounds_in_pixels); | 2674 direct_manipulation_helper_->SetBounds(bounds_in_pixels); |
2675 } | 2675 } |
2676 | 2676 |
2677 | 2677 |
2678 } // namespace views | 2678 } // namespace views |
OLD | NEW |