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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "content/child/v8_value_converter_impl.h" | 41 #include "content/child/v8_value_converter_impl.h" |
42 #include "content/child/webmessageportchannel_impl.h" | 42 #include "content/child/webmessageportchannel_impl.h" |
43 #include "content/common/content_constants_internal.h" | 43 #include "content/common/content_constants_internal.h" |
44 #include "content/common/content_switches_internal.h" | 44 #include "content/common/content_switches_internal.h" |
45 #include "content/common/database_messages.h" | 45 #include "content/common/database_messages.h" |
46 #include "content/common/dom_storage/dom_storage_types.h" | 46 #include "content/common/dom_storage/dom_storage_types.h" |
47 #include "content/common/drag_messages.h" | 47 #include "content/common/drag_messages.h" |
48 #include "content/common/frame_messages.h" | 48 #include "content/common/frame_messages.h" |
49 #include "content/common/frame_replication_state.h" | 49 #include "content/common/frame_replication_state.h" |
50 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 50 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 51 #include "content/common/input/input_event_utils.h" |
51 #include "content/common/input_messages.h" | 52 #include "content/common/input_messages.h" |
52 #include "content/common/pepper_messages.h" | 53 #include "content/common/pepper_messages.h" |
53 #include "content/common/site_isolation_policy.h" | 54 #include "content/common/site_isolation_policy.h" |
54 #include "content/common/ssl_status_serialization.h" | 55 #include "content/common/ssl_status_serialization.h" |
55 #include "content/common/view_messages.h" | 56 #include "content/common/view_messages.h" |
56 #include "content/public/common/bindings_policy.h" | 57 #include "content/public/common/bindings_policy.h" |
57 #include "content/public/common/content_client.h" | 58 #include "content/public/common/content_client.h" |
58 #include "content/public/common/content_constants.h" | 59 #include "content/public/common/content_constants.h" |
59 #include "content/public/common/content_switches.h" | 60 #include "content/public/common/content_switches.h" |
60 #include "content/public/common/drop_data.h" | 61 #include "content/public/common/drop_data.h" |
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2154 use_threaded_event_handling = compositor_deps_->IsElasticOverscrollEnabled(); | 2155 use_threaded_event_handling = compositor_deps_->IsElasticOverscrollEnabled(); |
2155 #endif | 2156 #endif |
2156 if (use_threaded_event_handling) { | 2157 if (use_threaded_event_handling) { |
2157 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 2158 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
2158 // render_thread may be NULL in tests. | 2159 // render_thread may be NULL in tests. |
2159 InputHandlerManager* input_handler_manager = | 2160 InputHandlerManager* input_handler_manager = |
2160 render_thread ? render_thread->input_handler_manager() : NULL; | 2161 render_thread ? render_thread->input_handler_manager() : NULL; |
2161 if (input_handler_manager) { | 2162 if (input_handler_manager) { |
2162 input_handler_manager->AddInputHandler( | 2163 input_handler_manager->AddInputHandler( |
2163 routing_id(), rwc->GetInputHandler(), AsWeakPtr(), | 2164 routing_id(), rwc->GetInputHandler(), AsWeakPtr(), |
2164 webkit_preferences_.enable_scroll_animator); | 2165 webkit_preferences_.enable_scroll_animator, |
| 2166 UseGestureBasedWheelScrolling()); |
2165 } | 2167 } |
2166 } | 2168 } |
2167 } | 2169 } |
2168 | 2170 |
2169 // blink::WebFrameClient ----------------------------------------------------- | 2171 // blink::WebFrameClient ----------------------------------------------------- |
2170 | 2172 |
2171 void RenderViewImpl::Repaint(const gfx::Size& size) { | 2173 void RenderViewImpl::Repaint(const gfx::Size& size) { |
2172 OnRepaint(size); | 2174 OnRepaint(size); |
2173 } | 2175 } |
2174 | 2176 |
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3537 if (IsUseZoomForDSFEnabled()) { | 3539 if (IsUseZoomForDSFEnabled()) { |
3538 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3540 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3539 } else { | 3541 } else { |
3540 webview()->setDeviceScaleFactor(device_scale_factor_); | 3542 webview()->setDeviceScaleFactor(device_scale_factor_); |
3541 } | 3543 } |
3542 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3544 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3543 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3545 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3544 } | 3546 } |
3545 | 3547 |
3546 } // namespace content | 3548 } // namespace content |
OLD | NEW |