| 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1589 } | 1589 } |
| 1590 | 1590 |
| 1591 //////////////////////////////////////////////////////////////////////////////// | 1591 //////////////////////////////////////////////////////////////////////////////// |
| 1592 // RenderWidgetHostViewAura, ui::EventHandler implementation: | 1592 // RenderWidgetHostViewAura, ui::EventHandler implementation: |
| 1593 | 1593 |
| 1594 void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) { | 1594 void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) { |
| 1595 event_handler_->OnKeyEvent(event); | 1595 event_handler_->OnKeyEvent(event); |
| 1596 } | 1596 } |
| 1597 | 1597 |
| 1598 void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { | 1598 void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { |
| 1599 #if defined(OS_WIN) |
| 1600 if (event->type() == ui::ET_MOUSE_MOVED) { |
| 1601 if (event->location() == last_mouse_move_location_) { |
| 1602 event->SetHandled(); |
| 1603 return; |
| 1604 } |
| 1605 last_mouse_move_location_ = event->location(); |
| 1606 } |
| 1607 #endif |
| 1599 event_handler_->OnMouseEvent(event); | 1608 event_handler_->OnMouseEvent(event); |
| 1600 } | 1609 } |
| 1601 | 1610 |
| 1602 cc::FrameSinkId RenderWidgetHostViewAura::FrameSinkIdAtPoint( | 1611 cc::FrameSinkId RenderWidgetHostViewAura::FrameSinkIdAtPoint( |
| 1603 cc::SurfaceHittestDelegate* delegate, | 1612 cc::SurfaceHittestDelegate* delegate, |
| 1604 const gfx::Point& point, | 1613 const gfx::Point& point, |
| 1605 gfx::Point* transformed_point) { | 1614 gfx::Point* transformed_point) { |
| 1606 DCHECK(device_scale_factor_ != 0.0f); | 1615 DCHECK(device_scale_factor_ != 0.0f); |
| 1607 | 1616 |
| 1608 // The surface hittest happens in device pixels, so we need to convert the | 1617 // The surface hittest happens in device pixels, so we need to convert the |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2374 | 2383 |
| 2375 void RenderWidgetHostViewAura::SetPopupChild( | 2384 void RenderWidgetHostViewAura::SetPopupChild( |
| 2376 RenderWidgetHostViewAura* popup_child_host_view) { | 2385 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2377 popup_child_host_view_ = popup_child_host_view; | 2386 popup_child_host_view_ = popup_child_host_view; |
| 2378 event_handler_->SetPopupChild( | 2387 event_handler_->SetPopupChild( |
| 2379 popup_child_host_view, | 2388 popup_child_host_view, |
| 2380 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2389 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2381 } | 2390 } |
| 2382 | 2391 |
| 2383 } // namespace content | 2392 } // namespace content |
| OLD | NEW |