Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 785723002: Add new extension APIs related to animation policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use prefs_tab_helper. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 settings->setSelectionIncludesAltImageText(true); 1064 settings->setSelectionIncludesAltImageText(true);
1065 1065
1066 settings->setV8CacheOptions( 1066 settings->setV8CacheOptions(
1067 static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options)); 1067 static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options));
1068 1068
1069 settings->setV8ScriptStreamingEnabled(prefs.v8_script_streaming_enabled); 1069 settings->setV8ScriptStreamingEnabled(prefs.v8_script_streaming_enabled);
1070 settings->setV8ScriptStreamingMode( 1070 settings->setV8ScriptStreamingMode(
1071 static_cast<WebSettings::V8ScriptStreamingMode>( 1071 static_cast<WebSettings::V8ScriptStreamingMode>(
1072 prefs.v8_script_streaming_mode)); 1072 prefs.v8_script_streaming_mode));
1073 1073
1074 #if defined(ENABLE_EXTENSIONS)
1075 settings->setImageAnimationPolicy(
1076 static_cast<WebSettings::ImageAnimationPolicy>(prefs.animation_policy));
1077 #endif
1078
1074 #if defined(OS_ANDROID) 1079 #if defined(OS_ANDROID)
1075 settings->setAllowCustomScrollbarInMainFrame(false); 1080 settings->setAllowCustomScrollbarInMainFrame(false);
1076 settings->setTextAutosizingEnabled(prefs.text_autosizing_enabled); 1081 settings->setTextAutosizingEnabled(prefs.text_autosizing_enabled);
1077 settings->setAccessibilityFontScaleFactor(prefs.font_scale_factor); 1082 settings->setAccessibilityFontScaleFactor(prefs.font_scale_factor);
1078 settings->setDeviceScaleAdjustment(prefs.device_scale_adjustment); 1083 settings->setDeviceScaleAdjustment(prefs.device_scale_adjustment);
1079 settings->setFullscreenSupported(prefs.fullscreen_supported); 1084 settings->setFullscreenSupported(prefs.fullscreen_supported);
1080 web_view->setIgnoreViewportTagScaleLimits(prefs.force_enable_zoom); 1085 web_view->setIgnoreViewportTagScaleLimits(prefs.force_enable_zoom);
1081 settings->setAutoZoomFocusedNodeToLegibleScale(true); 1086 settings->setAutoZoomFocusedNodeToLegibleScale(true);
1082 settings->setDoubleTapToZoomEnabled(prefs.double_tap_to_zoom_enabled); 1087 settings->setDoubleTapToZoomEnabled(prefs.double_tap_to_zoom_enabled);
1083 settings->setMediaControlsOverlayPlayButtonEnabled(true); 1088 settings->setMediaControlsOverlayPlayButtonEnabled(true);
(...skipping 3014 matching lines...) Expand 10 before | Expand all | Expand 10 after
4098 std::vector<gfx::Size> sizes; 4103 std::vector<gfx::Size> sizes;
4099 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4104 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4100 if (!url.isEmpty()) 4105 if (!url.isEmpty())
4101 urls.push_back( 4106 urls.push_back(
4102 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4107 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4103 } 4108 }
4104 SendUpdateFaviconURL(urls); 4109 SendUpdateFaviconURL(urls);
4105 } 4110 }
4106 4111
4107 } // namespace content 4112 } // namespace content
OLDNEW
« chrome/browser/ui/prefs/prefs_tab_helper.cc ('K') | « content/public/common/web_preferences.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698