| 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_action.h" | 7 #include "base/metrics/user_metrics_action.h" |
| 8 #include "content/browser/renderer_host/input/touch_selection_controller_client_
aura.h" | 8 #include "content/browser/renderer_host/input/touch_selection_controller_client_
aura.h" |
| 9 #include "content/browser/renderer_host/overscroll_controller.h" | 9 #include "content/browser/renderer_host/overscroll_controller.h" |
| 10 #include "content/browser/renderer_host/render_view_host_delegate.h" | 10 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 bool RenderWidgetHostViewEventHandler::CanRendererHandleEvent( | 541 bool RenderWidgetHostViewEventHandler::CanRendererHandleEvent( |
| 542 const ui::MouseEvent* event, | 542 const ui::MouseEvent* event, |
| 543 bool mouse_locked, | 543 bool mouse_locked, |
| 544 bool selection_popup) const { | 544 bool selection_popup) const { |
| 545 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) | 545 if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED) |
| 546 return false; | 546 return false; |
| 547 | 547 |
| 548 if (event->type() == ui::ET_MOUSE_EXITED) { | 548 if (event->type() == ui::ET_MOUSE_EXITED) { |
| 549 if (mouse_locked || selection_popup) | 549 if (mouse_locked || selection_popup) |
| 550 return false; | 550 return false; |
| 551 #if defined(OS_WIN) | 551 #if defined(OS_WIN) || defined(OS_LINUX) |
| 552 // Don't forward the mouse leave message which is received when the context | 552 // Don't forward the mouse leave message which is received when the context |
| 553 // menu is displayed by the page. This confuses the page and causes state | 553 // menu is displayed by the page. This confuses the page and causes state |
| 554 // changes. | 554 // changes. |
| 555 if (host_view_->IsShowingContextMenu()) | 555 if (host_view_->IsShowingContextMenu()) |
| 556 return false; | 556 return false; |
| 557 #endif | 557 #endif |
| 558 return true; | 558 return true; |
| 559 } | 559 } |
| 560 | 560 |
| 561 #if defined(OS_WIN) | 561 #if defined(OS_WIN) |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 host_->ForwardWheelEventWithLatencyInfo(event, latency); | 864 host_->ForwardWheelEventWithLatencyInfo(event, latency); |
| 865 } | 865 } |
| 866 | 866 |
| 867 void RenderWidgetHostViewEventHandler::ProcessTouchEvent( | 867 void RenderWidgetHostViewEventHandler::ProcessTouchEvent( |
| 868 const blink::WebTouchEvent& event, | 868 const blink::WebTouchEvent& event, |
| 869 const ui::LatencyInfo& latency) { | 869 const ui::LatencyInfo& latency) { |
| 870 host_->ForwardTouchEventWithLatencyInfo(event, latency); | 870 host_->ForwardTouchEventWithLatencyInfo(event, latency); |
| 871 } | 871 } |
| 872 | 872 |
| 873 } // namespace content | 873 } // namespace content |
| OLD | NEW |