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