OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 "content/browser/renderer_host/legacy_render_widget_host_win.h" | 5 #include "content/browser/renderer_host/legacy_render_widget_host_win.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/win/win_util.h" | 10 #include "base/win/win_util.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // current cursor location. We check for this property in our | 305 // current cursor location. We check for this property in our |
306 // WM_MOUSEACTIVATE handler and don't activate the window if the property is | 306 // WM_MOUSEACTIVATE handler and don't activate the window if the property is |
307 // set. | 307 // set. |
308 if (::GetProp(hwnd(), ui::kIgnoreTouchMouseActivateForWindow)) { | 308 if (::GetProp(hwnd(), ui::kIgnoreTouchMouseActivateForWindow)) { |
309 ::RemoveProp(hwnd(), ui::kIgnoreTouchMouseActivateForWindow); | 309 ::RemoveProp(hwnd(), ui::kIgnoreTouchMouseActivateForWindow); |
310 return MA_NOACTIVATE; | 310 return MA_NOACTIVATE; |
311 } | 311 } |
312 return MA_ACTIVATE; | 312 return MA_ACTIVATE; |
313 } | 313 } |
314 | 314 |
| 315 LRESULT LegacyRenderWidgetHostHWND::OnPointer(UINT message, |
| 316 WPARAM w_param, |
| 317 LPARAM l_param) { |
| 318 LRESULT ret = 0; |
| 319 if (GetWindowEventTarget(GetParent())) { |
| 320 bool msg_handled = false; |
| 321 ret = GetWindowEventTarget(GetParent()) |
| 322 ->HandlePointerMessage(message, w_param, l_param, &msg_handled); |
| 323 SetMsgHandled(msg_handled); |
| 324 } |
| 325 return ret; |
| 326 } |
| 327 |
315 LRESULT LegacyRenderWidgetHostHWND::OnTouch(UINT message, | 328 LRESULT LegacyRenderWidgetHostHWND::OnTouch(UINT message, |
316 WPARAM w_param, | 329 WPARAM w_param, |
317 LPARAM l_param) { | 330 LPARAM l_param) { |
318 LRESULT ret = 0; | 331 LRESULT ret = 0; |
319 if (GetWindowEventTarget(GetParent())) { | 332 if (GetWindowEventTarget(GetParent())) { |
320 bool msg_handled = false; | 333 bool msg_handled = false; |
321 ret = GetWindowEventTarget(GetParent())->HandleTouchMessage( | 334 ret = GetWindowEventTarget(GetParent())->HandleTouchMessage( |
322 message, w_param, l_param, &msg_handled); | 335 message, w_param, l_param, &msg_handled); |
323 SetMsgHandled(msg_handled); | 336 SetMsgHandled(msg_handled); |
324 } | 337 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 direct_manipulation_helper_->Activate(hwnd()); | 421 direct_manipulation_helper_->Activate(hwnd()); |
409 } else if (window_pos->flags & SWP_HIDEWINDOW) { | 422 } else if (window_pos->flags & SWP_HIDEWINDOW) { |
410 direct_manipulation_helper_->Deactivate(hwnd()); | 423 direct_manipulation_helper_->Deactivate(hwnd()); |
411 } | 424 } |
412 } | 425 } |
413 SetMsgHandled(FALSE); | 426 SetMsgHandled(FALSE); |
414 return 0; | 427 return 0; |
415 } | 428 } |
416 | 429 |
417 } // namespace content | 430 } // namespace content |
OLD | NEW |