| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/render_widget_host_view_event_handler.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_event_handler.h" | 
| 6 | 6 | 
| 7 #include "base/metrics/user_metrics.h" | 7 #include "base/metrics/user_metrics.h" | 
| 8 #include "base/metrics/user_metrics_action.h" | 8 #include "base/metrics/user_metrics_action.h" | 
| 9 #include "content/browser/renderer_host/input/touch_selection_controller_client_
     aura.h" | 9 #include "content/browser/renderer_host/input/touch_selection_controller_client_
     aura.h" | 
| 10 #include "content/browser/renderer_host/overscroll_controller.h" | 10 #include "content/browser/renderer_host/overscroll_controller.h" | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 48 | 48 | 
| 49 #if defined(OS_WIN) | 49 #if defined(OS_WIN) | 
| 50 // A callback function for EnumThreadWindows to enumerate and dismiss | 50 // A callback function for EnumThreadWindows to enumerate and dismiss | 
| 51 // any owned popup windows. | 51 // any owned popup windows. | 
| 52 BOOL CALLBACK DismissOwnedPopups(HWND window, LPARAM arg) { | 52 BOOL CALLBACK DismissOwnedPopups(HWND window, LPARAM arg) { | 
| 53   const HWND toplevel_hwnd = reinterpret_cast<HWND>(arg); | 53   const HWND toplevel_hwnd = reinterpret_cast<HWND>(arg); | 
| 54 | 54 | 
| 55   if (::IsWindowVisible(window)) { | 55   if (::IsWindowVisible(window)) { | 
| 56     const HWND owner = ::GetWindow(window, GW_OWNER); | 56     const HWND owner = ::GetWindow(window, GW_OWNER); | 
| 57     if (toplevel_hwnd == owner) { | 57     if (toplevel_hwnd == owner) { | 
| 58       ::PostMessage(window, WM_CANCELMODE, 0, 0); | 58       ::PostMessageW(window, WM_CANCELMODE, 0, 0); | 
| 59     } | 59     } | 
| 60   } | 60   } | 
| 61 | 61 | 
| 62   return TRUE; | 62   return TRUE; | 
| 63 } | 63 } | 
| 64 #endif  // defined(OS_WIN) | 64 #endif  // defined(OS_WIN) | 
| 65 | 65 | 
| 66 gfx::Point GetScreenLocationFromEvent(const ui::LocatedEvent& event) { | 66 gfx::Point GetScreenLocationFromEvent(const ui::LocatedEvent& event) { | 
| 67   aura::Window* root = | 67   aura::Window* root = | 
| 68       static_cast<aura::Window*>(event.target())->GetRootWindow(); | 68       static_cast<aura::Window*>(event.target())->GetRootWindow(); | 
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 906   host_->ForwardWheelEventWithLatencyInfo(event, latency); | 906   host_->ForwardWheelEventWithLatencyInfo(event, latency); | 
| 907 } | 907 } | 
| 908 | 908 | 
| 909 void RenderWidgetHostViewEventHandler::ProcessTouchEvent( | 909 void RenderWidgetHostViewEventHandler::ProcessTouchEvent( | 
| 910     const blink::WebTouchEvent& event, | 910     const blink::WebTouchEvent& event, | 
| 911     const ui::LatencyInfo& latency) { | 911     const ui::LatencyInfo& latency) { | 
| 912   host_->ForwardTouchEventWithLatencyInfo(event, latency); | 912   host_->ForwardTouchEventWithLatencyInfo(event, latency); | 
| 913 } | 913 } | 
| 914 | 914 | 
| 915 }  // namespace content | 915 }  // namespace content | 
| OLD | NEW | 
|---|