Index: content/browser/renderer_host/render_view_host_impl.cc |
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
index bd37a3cbb05e221e57d090cad2642c1a0d5d627b..04426da78cd53a714f01cc0714ac014e8b90a6f1 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.cc |
+++ b/content/browser/renderer_host/render_view_host_impl.cc |
@@ -24,6 +24,7 @@ |
#include "base/time/time.h" |
#include "base/values.h" |
#include "cc/base/switches.h" |
+#include "content/browser/accessibility/browser_accessibility_state_impl.h" |
#include "content/browser/child_process_security_policy_impl.h" |
#include "content/browser/dom_storage/session_storage_namespace_impl.h" |
#include "content/browser/frame_host/frame_tree.h" |
@@ -518,6 +519,15 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs(const GURL& url) { |
prefs.v8_script_streaming_mode = |
V8_SCRIPT_STREAMING_MODE_ONLY_ASYNC_AND_DEFER; |
+ std::string image_animation_policy = |
+ BrowserAccessibilityStateImpl::GetInstance()->GetImageAnimationPolicy(); |
+ if (image_animation_policy == "Allowed") |
+ prefs.animation_policy = IMAGE_ANIMATION_POLICY_ALLOWED; |
dmazzoni
2014/12/08 07:46:01
nit: just 2 spaces indent for an "if" block. (Line
|
+ else if (image_animation_policy == "Once") |
+ prefs.animation_policy = IMAGE_ANIMATION_POLICY_ANIMATION_ONCE; |
+ else if (image_animation_policy == "None") |
+ prefs.animation_policy = IMAGE_ANIMATION_POLICY_NO_ANIMATION; |
+ |
GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); |
return prefs; |
} |