| 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "ui/aura/window_event_dispatcher.h" | 59 #include "ui/aura/window_event_dispatcher.h" |
| 60 #include "ui/aura/window_observer.h" | 60 #include "ui/aura/window_observer.h" |
| 61 #include "ui/aura/window_tracker.h" | 61 #include "ui/aura/window_tracker.h" |
| 62 #include "ui/aura/window_tree_host.h" | 62 #include "ui/aura/window_tree_host.h" |
| 63 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 63 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
| 64 #include "ui/base/hit_test.h" | 64 #include "ui/base/hit_test.h" |
| 65 #include "ui/base/ime/input_method.h" | 65 #include "ui/base/ime/input_method.h" |
| 66 #include "ui/base/ui_base_types.h" | 66 #include "ui/base/ui_base_types.h" |
| 67 #include "ui/compositor/compositor_vsync_manager.h" | 67 #include "ui/compositor/compositor_vsync_manager.h" |
| 68 #include "ui/compositor/dip_util.h" | 68 #include "ui/compositor/dip_util.h" |
| 69 #include "ui/events/blink/blink_event_util.h" |
| 69 #include "ui/events/event.h" | 70 #include "ui/events/event.h" |
| 70 #include "ui/events/event_utils.h" | 71 #include "ui/events/event_utils.h" |
| 71 #include "ui/events/gestures/gesture_recognizer.h" | 72 #include "ui/events/gestures/gesture_recognizer.h" |
| 72 #include "ui/gfx/canvas.h" | 73 #include "ui/gfx/canvas.h" |
| 73 #include "ui/gfx/display.h" | 74 #include "ui/gfx/display.h" |
| 74 #include "ui/gfx/geometry/rect_conversions.h" | 75 #include "ui/gfx/geometry/rect_conversions.h" |
| 75 #include "ui/gfx/geometry/size_conversions.h" | 76 #include "ui/gfx/geometry/size_conversions.h" |
| 76 #include "ui/gfx/screen.h" | 77 #include "ui/gfx/screen.h" |
| 77 #include "ui/gfx/skia_util.h" | 78 #include "ui/gfx/skia_util.h" |
| 78 #include "ui/wm/public/activation_client.h" | 79 #include "ui/wm/public/activation_client.h" |
| (...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2096 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnTouchEvent"); | 2097 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnTouchEvent"); |
| 2097 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event)) | 2098 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event)) |
| 2098 return; | 2099 return; |
| 2099 | 2100 |
| 2100 // Update the touch event first. | 2101 // Update the touch event first. |
| 2101 if (!pointer_state_.OnTouch(*event)) { | 2102 if (!pointer_state_.OnTouch(*event)) { |
| 2102 event->StopPropagation(); | 2103 event->StopPropagation(); |
| 2103 return; | 2104 return; |
| 2104 } | 2105 } |
| 2105 | 2106 |
| 2106 blink::WebTouchEvent touch_event = CreateWebTouchEventFromMotionEvent( | 2107 blink::WebTouchEvent touch_event = ui::CreateWebTouchEventFromMotionEvent( |
| 2107 pointer_state_, event->may_cause_scrolling()); | 2108 pointer_state_, event->may_cause_scrolling()); |
| 2108 pointer_state_.CleanupRemovedTouchPoints(*event); | 2109 pointer_state_.CleanupRemovedTouchPoints(*event); |
| 2109 | 2110 |
| 2110 // It is important to always mark events as being handled asynchronously when | 2111 // It is important to always mark events as being handled asynchronously when |
| 2111 // they are forwarded. This ensures that the current event does not get | 2112 // they are forwarded. This ensures that the current event does not get |
| 2112 // processed by the gesture recognizer before events currently awaiting | 2113 // processed by the gesture recognizer before events currently awaiting |
| 2113 // dispatch in the touch queue. | 2114 // dispatch in the touch queue. |
| 2114 event->DisableSynchronousHandling(); | 2115 event->DisableSynchronousHandling(); |
| 2115 host_->ForwardTouchEventWithLatencyInfo(touch_event, *event->latency()); | 2116 host_->ForwardTouchEventWithLatencyInfo(touch_event, *event->latency()); |
| 2116 } | 2117 } |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2714 | 2715 |
| 2715 //////////////////////////////////////////////////////////////////////////////// | 2716 //////////////////////////////////////////////////////////////////////////////// |
| 2716 // RenderWidgetHostViewBase, public: | 2717 // RenderWidgetHostViewBase, public: |
| 2717 | 2718 |
| 2718 // static | 2719 // static |
| 2719 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2720 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2720 GetScreenInfoForWindow(results, NULL); | 2721 GetScreenInfoForWindow(results, NULL); |
| 2721 } | 2722 } |
| 2722 | 2723 |
| 2723 } // namespace content | 2724 } // namespace content |
| OLD | NEW |