Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index b6e6de5ecbbf505c069ddec6b2190416543aff33..9313d3b417275326433b3103e81fb33fb90935ac 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -624,6 +624,12 @@ ContentSettingToPermissionStatus(ContentSetting setting) { |
| namespace chrome { |
| +#if defined(ENABLE_EXTENSIONS) |
| +const char kAnimationPolicyAllowed[] = "allowed"; |
|
Lei Zhang
2015/01/30 20:18:08
These probably should go in chrome/browser/accessi
je_julie(Not used)
2015/01/31 07:25:35
OK. I think I'd better add animation_policy_prefs
|
| +const char kAnimationPolicyOnce[] = "once"; |
| +const char kAnimationPolicyNone[] = "none"; |
| +#endif |
| + |
| ChromeContentBrowserClient::ChromeContentBrowserClient() |
| : prerender_tracker_(NULL), |
| weak_factory_(this) { |
| @@ -2278,6 +2284,18 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs( |
| web_prefs->hyperlink_auditing_enabled = |
| prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); |
| +#if defined(ENABLE_EXTENSIONS) |
| + std::string image_animation_policy = |
| + prefs->GetString(prefs::kAnimationPolicy); |
| + if (image_animation_policy == kAnimationPolicyOnce) |
| + web_prefs->animation_policy = |
| + content::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE; |
| + else if (image_animation_policy == kAnimationPolicyNone) |
| + web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_NO_ANIMATION; |
| + else |
| + web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ALLOWED; |
| +#endif |
| + |
| // Make sure we will set the default_encoding with canonical encoding name. |
| web_prefs->default_encoding = |
| CharacterEncoding::GetCanonicalEncodingNameByAliasName( |