| 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1024 // platforms because their media pipelines are not stable enough to handle | 1024 // platforms because their media pipelines are not stable enough to handle |
| 1025 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826. | 1025 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826. |
| 1026 const bool is_low_end_device = | 1026 const bool is_low_end_device = |
| 1027 base::android::BuildInfo::GetInstance()->sdk_int() <= | 1027 base::android::BuildInfo::GetInstance()->sdk_int() <= |
| 1028 base::android::SDK_VERSION_JELLY_BEAN_MR2 || | 1028 base::android::SDK_VERSION_JELLY_BEAN_MR2 || |
| 1029 base::SysInfo::IsLowEndDevice(); | 1029 base::SysInfo::IsLowEndDevice(); |
| 1030 // TODO(mlamouri): rename this setting "isLowEndDevice". | 1030 // TODO(mlamouri): rename this setting "isLowEndDevice". |
| 1031 settings->setForcePreloadNoneForMediaElements(is_low_end_device); | 1031 settings->setForcePreloadNoneForMediaElements(is_low_end_device); |
| 1032 #endif | 1032 #endif |
| 1033 | 1033 |
| 1034 settings->setAutoplayExperimentMode( | |
| 1035 blink::WebString::fromUTF8(prefs.autoplay_experiment_mode)); | |
| 1036 | |
| 1037 settings->setViewportEnabled(prefs.viewport_enabled); | 1034 settings->setViewportEnabled(prefs.viewport_enabled); |
| 1038 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); | 1035 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); |
| 1039 settings->setShrinksViewportContentToFit( | 1036 settings->setShrinksViewportContentToFit( |
| 1040 prefs.shrinks_viewport_contents_to_fit); | 1037 prefs.shrinks_viewport_contents_to_fit); |
| 1041 settings->setViewportStyle( | 1038 settings->setViewportStyle( |
| 1042 static_cast<blink::WebViewportStyle>(prefs.viewport_style)); | 1039 static_cast<blink::WebViewportStyle>(prefs.viewport_style)); |
| 1043 | 1040 |
| 1044 settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale); | 1041 settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale); |
| 1045 settings->setMainFrameResizesAreOrientationChanges( | 1042 settings->setMainFrameResizesAreOrientationChanges( |
| 1046 prefs.main_frame_resizes_are_orientation_changes); | 1043 prefs.main_frame_resizes_are_orientation_changes); |
| (...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2778 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2775 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2779 } | 2776 } |
| 2780 | 2777 |
| 2781 std::unique_ptr<InputEventAck> ack( | 2778 std::unique_ptr<InputEventAck> ack( |
| 2782 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, | 2779 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, |
| 2783 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2780 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2784 OnInputEventAck(std::move(ack)); | 2781 OnInputEventAck(std::move(ack)); |
| 2785 } | 2782 } |
| 2786 | 2783 |
| 2787 } // namespace content | 2784 } // namespace content |
| OLD | NEW |