| 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_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 prefs.device_supports_mouse = false; | 473 prefs.device_supports_mouse = false; |
| 474 #endif | 474 #endif |
| 475 | 475 |
| 476 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); | 476 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); |
| 477 | 477 |
| 478 prefs.touch_adjustment_enabled = | 478 prefs.touch_adjustment_enabled = |
| 479 !command_line.HasSwitch(switches::kDisableTouchAdjustment); | 479 !command_line.HasSwitch(switches::kDisableTouchAdjustment); |
| 480 | 480 |
| 481 prefs.enable_scroll_animator = | 481 prefs.enable_scroll_animator = |
| 482 !command_line.HasSwitch(switches::kDisableSmoothScrolling) && | 482 !command_line.HasSwitch(switches::kDisableSmoothScrolling) && |
| 483 gfx::Animation::ShouldRenderRichAnimation(); | 483 gfx::Animation::ScrollAnimationsEnabledBySystem(); |
| 484 | 484 |
| 485 // Certain GPU features might have been blacklisted. | 485 // Certain GPU features might have been blacklisted. |
| 486 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); | 486 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); |
| 487 | 487 |
| 488 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 488 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
| 489 GetProcess()->GetID())) { | 489 GetProcess()->GetID())) { |
| 490 prefs.loads_images_automatically = true; | 490 prefs.loads_images_automatically = true; |
| 491 prefs.javascript_enabled = true; | 491 prefs.javascript_enabled = true; |
| 492 } | 492 } |
| 493 | 493 |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 | 1367 |
| 1368 gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) { | 1368 gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) { |
| 1369 // The point in guest view is already converted. | 1369 // The point in guest view is already converted. |
| 1370 if (!render_widget_host_->scale_input_to_viewport()) | 1370 if (!render_widget_host_->scale_input_to_viewport()) |
| 1371 return point; | 1371 return point; |
| 1372 float scale = GetWidget()->GetView()->current_device_scale_factor(); | 1372 float scale = GetWidget()->GetView()->current_device_scale_factor(); |
| 1373 return gfx::Point(point.x() * scale, point.y() * scale); | 1373 return gfx::Point(point.x() * scale, point.y() * scale); |
| 1374 } | 1374 } |
| 1375 | 1375 |
| 1376 } // namespace content | 1376 } // namespace content |
| OLD | NEW |