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/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #include "ui/aura/test/test_cursor_client.h" | 47 #include "ui/aura/test/test_cursor_client.h" |
48 #include "ui/aura/test/test_screen.h" | 48 #include "ui/aura/test/test_screen.h" |
49 #include "ui/aura/test/test_window_delegate.h" | 49 #include "ui/aura/test/test_window_delegate.h" |
50 #include "ui/aura/window.h" | 50 #include "ui/aura/window.h" |
51 #include "ui/aura/window_event_dispatcher.h" | 51 #include "ui/aura/window_event_dispatcher.h" |
52 #include "ui/aura/window_observer.h" | 52 #include "ui/aura/window_observer.h" |
53 #include "ui/base/ui_base_types.h" | 53 #include "ui/base/ui_base_types.h" |
54 #include "ui/compositor/compositor.h" | 54 #include "ui/compositor/compositor.h" |
55 #include "ui/compositor/layer_tree_owner.h" | 55 #include "ui/compositor/layer_tree_owner.h" |
56 #include "ui/compositor/test/draw_waiter_for_test.h" | 56 #include "ui/compositor/test/draw_waiter_for_test.h" |
| 57 #include "ui/events/blink/blink_event_util.h" |
57 #include "ui/events/event.h" | 58 #include "ui/events/event.h" |
58 #include "ui/events/event_utils.h" | 59 #include "ui/events/event_utils.h" |
59 #include "ui/events/gesture_detection/gesture_configuration.h" | 60 #include "ui/events/gesture_detection/gesture_configuration.h" |
60 #include "ui/events/keycodes/dom3/dom_code.h" | 61 #include "ui/events/keycodes/dom3/dom_code.h" |
61 #include "ui/events/keycodes/dom4/keycode_converter.h" | 62 #include "ui/events/keycodes/dom4/keycode_converter.h" |
62 #include "ui/events/test/event_generator.h" | 63 #include "ui/events/test/event_generator.h" |
63 #include "ui/wm/core/default_activation_client.h" | 64 #include "ui/wm/core/default_activation_client.h" |
64 #include "ui/wm/core/default_screen_position_client.h" | 65 #include "ui/wm/core/default_screen_position_client.h" |
65 #include "ui/wm/core/window_util.h" | 66 #include "ui/wm/core/window_util.h" |
66 | 67 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 class FakeResizeLock : public ResizeLock { | 293 class FakeResizeLock : public ResizeLock { |
293 public: | 294 public: |
294 FakeResizeLock(const gfx::Size new_size, bool defer_compositor_lock) | 295 FakeResizeLock(const gfx::Size new_size, bool defer_compositor_lock) |
295 : ResizeLock(new_size, defer_compositor_lock) {} | 296 : ResizeLock(new_size, defer_compositor_lock) {} |
296 }; | 297 }; |
297 | 298 |
298 void OnTouchEvent(ui::TouchEvent* event) override { | 299 void OnTouchEvent(ui::TouchEvent* event) override { |
299 RenderWidgetHostViewAura::OnTouchEvent(event); | 300 RenderWidgetHostViewAura::OnTouchEvent(event); |
300 if (pointer_state().GetPointerCount() > 0) { | 301 if (pointer_state().GetPointerCount() > 0) { |
301 touch_event_.reset( | 302 touch_event_.reset( |
302 new blink::WebTouchEvent(CreateWebTouchEventFromMotionEvent( | 303 new blink::WebTouchEvent(ui::CreateWebTouchEventFromMotionEvent( |
303 pointer_state(), event->may_cause_scrolling()))); | 304 pointer_state(), event->may_cause_scrolling()))); |
304 } else { | 305 } else { |
305 // Never create a WebTouchEvent with 0 touch points. | 306 // Never create a WebTouchEvent with 0 touch points. |
306 touch_event_.reset(); | 307 touch_event_.reset(); |
307 } | 308 } |
308 } | 309 } |
309 | 310 |
310 bool has_resize_lock_; | 311 bool has_resize_lock_; |
311 gfx::Size last_frame_size_; | 312 gfx::Size last_frame_size_; |
312 scoped_ptr<cc::CopyOutputRequest> last_copy_request_; | 313 scoped_ptr<cc::CopyOutputRequest> last_copy_request_; |
(...skipping 2903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3216 ui::TouchEvent press2( | 3217 ui::TouchEvent press2( |
3217 ui::ET_TOUCH_PRESSED, gfx::Point(20, 20), 1, ui::EventTimeForNow()); | 3218 ui::ET_TOUCH_PRESSED, gfx::Point(20, 20), 1, ui::EventTimeForNow()); |
3218 view_->OnTouchEvent(&press2); | 3219 view_->OnTouchEvent(&press2); |
3219 SendInputEventACK(blink::WebInputEvent::TouchStart, | 3220 SendInputEventACK(blink::WebInputEvent::TouchStart, |
3220 INPUT_EVENT_ACK_STATE_CONSUMED); | 3221 INPUT_EVENT_ACK_STATE_CONSUMED); |
3221 | 3222 |
3222 EXPECT_EQ(2U, view_->dispatcher_->processed_touch_event_count()); | 3223 EXPECT_EQ(2U, view_->dispatcher_->processed_touch_event_count()); |
3223 } | 3224 } |
3224 | 3225 |
3225 } // namespace content | 3226 } // namespace content |
OLD | NEW |