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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 #include "content/browser/accessibility/browser_accessibility_win.h" | 83 #include "content/browser/accessibility/browser_accessibility_win.h" |
83 #include "ui/base/win/hidden_window.h" | 84 #include "ui/base/win/hidden_window.h" |
84 #include "ui/gfx/gdi_util.h" | 85 #include "ui/gfx/gdi_util.h" |
85 #include "ui/gfx/win/dpi.h" | 86 #include "ui/gfx/win/dpi.h" |
86 #endif | 87 #endif |
87 | 88 |
88 using gfx::RectToSkIRect; | 89 using gfx::RectToSkIRect; |
89 using gfx::SkIRectToRect; | 90 using gfx::SkIRectToRect; |
90 | 91 |
91 using WebKit::WebScreenInfo; | 92 using WebKit::WebScreenInfo; |
93 using WebKit::WebInputEvent; | |
jdduke (slow)
2013/10/28 15:59:47
Nit: I don't think you need this using decl now?
kouhei (in TOK)
2013/10/30 03:18:35
Done.
| |
92 using WebKit::WebTouchEvent; | 94 using WebKit::WebTouchEvent; |
93 | 95 |
94 namespace content { | 96 namespace content { |
95 | 97 |
96 namespace { | 98 namespace { |
97 | 99 |
98 void MailboxReleaseCallback(scoped_ptr<base::SharedMemory> shared_memory, | 100 void MailboxReleaseCallback(scoped_ptr<base::SharedMemory> shared_memory, |
99 unsigned sync_point, bool lost_resource) { | 101 unsigned sync_point, bool lost_resource) { |
100 // NOTE: shared_memory will get released when we go out of scope. | 102 // NOTE: shared_memory will get released when we go out of scope. |
101 } | 103 } |
(...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2101 return; | 2103 return; |
2102 | 2104 |
2103 ui::EventResult result = (ack_result == | 2105 ui::EventResult result = (ack_result == |
2104 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; | 2106 INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; |
2105 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), | 2107 for (ScopedVector<ui::TouchEvent>::iterator iter = events.begin(), |
2106 end = events.end(); iter != end; ++iter) { | 2108 end = events.end(); iter != end; ++iter) { |
2107 root->ProcessedTouchEvent((*iter), window_, result); | 2109 root->ProcessedTouchEvent((*iter), window_, result); |
2108 } | 2110 } |
2109 } | 2111 } |
2110 | 2112 |
2113 SyntheticGestureTarget* | |
2114 RenderWidgetHostViewAura::CreateSyntheticGestureTarget() { | |
2115 return new SyntheticGestureTargetAura(this); | |
2116 } | |
2117 | |
2111 SyntheticGesture* RenderWidgetHostViewAura::CreateSmoothScrollGesture( | 2118 SyntheticGesture* RenderWidgetHostViewAura::CreateSmoothScrollGesture( |
2112 bool scroll_down, | 2119 bool scroll_down, |
2113 int pixels_to_scroll, | 2120 int pixels_to_scroll, |
2114 int mouse_event_x, | 2121 int mouse_event_x, |
2115 int mouse_event_y) { | 2122 int mouse_event_y) { |
2116 return new TouchSmoothScrollGestureAura(scroll_down, | 2123 return new TouchSmoothScrollGestureAura(scroll_down, |
2117 pixels_to_scroll, | 2124 pixels_to_scroll, |
2118 mouse_event_x, | 2125 mouse_event_x, |
2119 mouse_event_y, | 2126 mouse_event_y, |
2120 window_); | 2127 window_); |
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3403 RenderWidgetHost* widget) { | 3410 RenderWidgetHost* widget) { |
3404 return new RenderWidgetHostViewAura(widget); | 3411 return new RenderWidgetHostViewAura(widget); |
3405 } | 3412 } |
3406 | 3413 |
3407 // static | 3414 // static |
3408 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3415 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
3409 GetScreenInfoForWindow(results, NULL); | 3416 GetScreenInfoForWindow(results, NULL); |
3410 } | 3417 } |
3411 | 3418 |
3412 } // namespace content | 3419 } // namespace content |
OLD | NEW |