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/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "cc/layers/delegated_frame_provider.h" | 15 #include "cc/layers/delegated_frame_provider.h" |
16 #include "cc/output/compositor_frame.h" | 16 #include "cc/output/compositor_frame.h" |
17 #include "cc/output/compositor_frame_ack.h" | 17 #include "cc/output/compositor_frame_ack.h" |
18 #include "cc/output/copy_output_request.h" | 18 #include "cc/output/copy_output_request.h" |
19 #include "cc/output/copy_output_result.h" | 19 #include "cc/output/copy_output_result.h" |
20 #include "cc/resources/texture_mailbox.h" | 20 #include "cc/resources/texture_mailbox.h" |
21 #include "cc/trees/layer_tree_settings.h" | 21 #include "cc/trees/layer_tree_settings.h" |
22 #include "content/browser/accessibility/browser_accessibility_manager.h" | 22 #include "content/browser/accessibility/browser_accessibility_manager.h" |
23 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 23 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
24 #include "content/browser/aura/compositor_resize_lock.h" | 24 #include "content/browser/aura/compositor_resize_lock.h" |
25 #include "content/browser/gpu/compositor_util.h" | 25 #include "content/browser/gpu/compositor_util.h" |
26 #include "content/browser/renderer_host/backing_store_aura.h" | 26 #include "content/browser/renderer_host/backing_store_aura.h" |
27 #include "content/browser/renderer_host/dip_util.h" | 27 #include "content/browser/renderer_host/dip_util.h" |
| 28 #include "content/browser/renderer_host/input/synthetic_gesture_target_aura.h" |
28 #include "content/browser/renderer_host/overscroll_controller.h" | 29 #include "content/browser/renderer_host/overscroll_controller.h" |
29 #include "content/browser/renderer_host/render_view_host_delegate.h" | 30 #include "content/browser/renderer_host/render_view_host_delegate.h" |
30 #include "content/browser/renderer_host/render_widget_host_impl.h" | 31 #include "content/browser/renderer_host/render_widget_host_impl.h" |
31 #include "content/browser/renderer_host/touch_smooth_scroll_gesture_aura.h" | 32 #include "content/browser/renderer_host/touch_smooth_scroll_gesture_aura.h" |
32 #include "content/browser/renderer_host/ui_events_helper.h" | 33 #include "content/browser/renderer_host/ui_events_helper.h" |
33 #include "content/browser/renderer_host/web_input_event_aura.h" | 34 #include "content/browser/renderer_host/web_input_event_aura.h" |
34 #include "content/common/gpu/client/gl_helper.h" | 35 #include "content/common/gpu/client/gl_helper.h" |
35 #include "content/common/gpu/gpu_messages.h" | 36 #include "content/common/gpu/gpu_messages.h" |
36 #include "content/common/view_messages.h" | 37 #include "content/common/view_messages.h" |
37 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" | 38 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" |
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 return; | 2003 return; |
2003 | 2004 |
2004 ui::EventResult result = (ack_result == | 2005 ui::EventResult result = (ack_result == |
2005 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; | 2006 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; |
2006 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), | 2007 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), |
2007 end = events.end(); iter != end; ++iter) { | 2008 end = events.end(); iter != end; ++iter) { |
2008 dispatcher->ProcessedTouchEvent((*iter), window_, result); | 2009 dispatcher->ProcessedTouchEvent((*iter), window_, result); |
2009 } | 2010 } |
2010 } | 2011 } |
2011 | 2012 |
| 2013 scoped_ptr<SyntheticGestureTarget> |
| 2014 RenderWidgetHostViewAura::CreateSyntheticGestureTarget() { |
| 2015 return scoped_ptr<SyntheticGestureTarget>( |
| 2016 new SyntheticGestureTargetAura(host_)); |
| 2017 } |
| 2018 |
2012 SyntheticGesture* RenderWidgetHostViewAura::CreateSmoothScrollGesture( | 2019 SyntheticGesture* RenderWidgetHostViewAura::CreateSmoothScrollGesture( |
2013 bool scroll_down, | 2020 bool scroll_down, |
2014 int pixels_to_scroll, | 2021 int pixels_to_scroll, |
2015 int mouse_event_x, | 2022 int mouse_event_x, |
2016 int mouse_event_y) { | 2023 int mouse_event_y) { |
2017 return new TouchSmoothScrollGestureAura(scroll_down, | 2024 return new TouchSmoothScrollGestureAura(scroll_down, |
2018 pixels_to_scroll, | 2025 pixels_to_scroll, |
2019 mouse_event_x, | 2026 mouse_event_x, |
2020 mouse_event_y, | 2027 mouse_event_y, |
2021 window_); | 2028 window_); |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3320 RenderWidgetHost* widget) { | 3327 RenderWidgetHost* widget) { |
3321 return new RenderWidgetHostViewAura(widget); | 3328 return new RenderWidgetHostViewAura(widget); |
3322 } | 3329 } |
3323 | 3330 |
3324 // static | 3331 // static |
3325 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3332 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
3326 GetScreenInfoForWindow(results, NULL); | 3333 GetScreenInfoForWindow(results, NULL); |
3327 } | 3334 } |
3328 | 3335 |
3329 } // namespace content | 3336 } // namespace content |
OLD | NEW |