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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 785723002: Add new extension APIs related to animation policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: animationPolicy added to accessibilityFeatures Created 6 years 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 web_prefs->asynchronous_spell_checking_enabled = true; 2324 web_prefs->asynchronous_spell_checking_enabled = true;
2325 web_prefs->unified_textchecker_enabled = true; 2325 web_prefs->unified_textchecker_enabled = true;
2326 2326
2327 web_prefs->uses_universal_detector = 2327 web_prefs->uses_universal_detector =
2328 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); 2328 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector);
2329 web_prefs->text_areas_are_resizable = 2329 web_prefs->text_areas_are_resizable =
2330 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); 2330 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable);
2331 web_prefs->hyperlink_auditing_enabled = 2331 web_prefs->hyperlink_auditing_enabled =
2332 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); 2332 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing);
2333 2333
2334 std::string image_animation_policy = prefs->GetString(prefs::kAnimationPolicy) ;
not at google - send to devlin 2014/12/11 17:48:15 Please run git cl format over this CL.
je_julie(Not used) 2014/12/12 13:15:45 I ran git cl format with new patchset.
2335 if (image_animation_policy == "once")
2336 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE ;
2337 else if (image_animation_policy == "none")
2338 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_NO_ANIMATION;
2339 else
2340 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ALLOWED;
2341
2334 // Make sure we will set the default_encoding with canonical encoding name. 2342 // Make sure we will set the default_encoding with canonical encoding name.
2335 web_prefs->default_encoding = 2343 web_prefs->default_encoding =
2336 CharacterEncoding::GetCanonicalEncodingNameByAliasName( 2344 CharacterEncoding::GetCanonicalEncodingNameByAliasName(
2337 web_prefs->default_encoding); 2345 web_prefs->default_encoding);
2338 if (web_prefs->default_encoding.empty()) { 2346 if (web_prefs->default_encoding.empty()) {
2339 prefs->ClearPref(prefs::kDefaultCharset); 2347 prefs->ClearPref(prefs::kDefaultCharset);
2340 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); 2348 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset);
2341 } 2349 }
2342 DCHECK(!web_prefs->default_encoding.empty()); 2350 DCHECK(!web_prefs->default_encoding.empty());
2343 2351
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 switches::kDisableWebRtcEncryption, 2682 switches::kDisableWebRtcEncryption,
2675 }; 2683 };
2676 to_command_line->CopySwitchesFrom(from_command_line, 2684 to_command_line->CopySwitchesFrom(from_command_line,
2677 kWebRtcDevSwitchNames, 2685 kWebRtcDevSwitchNames,
2678 arraysize(kWebRtcDevSwitchNames)); 2686 arraysize(kWebRtcDevSwitchNames));
2679 } 2687 }
2680 } 2688 }
2681 #endif // defined(ENABLE_WEBRTC) 2689 #endif // defined(ENABLE_WEBRTC)
2682 2690
2683 } // namespace chrome 2691 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698