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

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: AccessibilityNotifier Created 5 years, 11 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 "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 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 web_prefs->asynchronous_spell_checking_enabled = true; 2265 web_prefs->asynchronous_spell_checking_enabled = true;
2266 web_prefs->unified_textchecker_enabled = true; 2266 web_prefs->unified_textchecker_enabled = true;
2267 2267
2268 web_prefs->uses_universal_detector = 2268 web_prefs->uses_universal_detector =
2269 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); 2269 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector);
2270 web_prefs->text_areas_are_resizable = 2270 web_prefs->text_areas_are_resizable =
2271 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); 2271 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable);
2272 web_prefs->hyperlink_auditing_enabled = 2272 web_prefs->hyperlink_auditing_enabled =
2273 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing); 2273 prefs->GetBoolean(prefs::kEnableHyperlinkAuditing);
2274 2274
2275 std::string image_animation_policy =
2276 prefs->GetString(prefs::kAnimationPolicy);
2277 if (image_animation_policy == "once")
dmazzoni 2015/01/27 06:52:41 Same here, these strings should be string constant
je_julie(Not used) 2015/01/28 04:42:00 I updated it with string constants.
2278 web_prefs->animation_policy =
2279 content::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE;
2280 else if (image_animation_policy == "none")
2281 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_NO_ANIMATION;
2282 else
2283 web_prefs->animation_policy = content::IMAGE_ANIMATION_POLICY_ALLOWED;
2284
2275 // Make sure we will set the default_encoding with canonical encoding name. 2285 // Make sure we will set the default_encoding with canonical encoding name.
2276 web_prefs->default_encoding = 2286 web_prefs->default_encoding =
2277 CharacterEncoding::GetCanonicalEncodingNameByAliasName( 2287 CharacterEncoding::GetCanonicalEncodingNameByAliasName(
2278 web_prefs->default_encoding); 2288 web_prefs->default_encoding);
2279 if (web_prefs->default_encoding.empty()) { 2289 if (web_prefs->default_encoding.empty()) {
2280 prefs->ClearPref(prefs::kDefaultCharset); 2290 prefs->ClearPref(prefs::kDefaultCharset);
2281 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset); 2291 web_prefs->default_encoding = prefs->GetString(prefs::kDefaultCharset);
2282 } 2292 }
2283 DCHECK(!web_prefs->default_encoding.empty()); 2293 DCHECK(!web_prefs->default_encoding.empty());
2284 2294
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 switches::kDisableWebRtcEncryption, 2631 switches::kDisableWebRtcEncryption,
2622 }; 2632 };
2623 to_command_line->CopySwitchesFrom(from_command_line, 2633 to_command_line->CopySwitchesFrom(from_command_line,
2624 kWebRtcDevSwitchNames, 2634 kWebRtcDevSwitchNames,
2625 arraysize(kWebRtcDevSwitchNames)); 2635 arraysize(kWebRtcDevSwitchNames));
2626 } 2636 }
2627 } 2637 }
2628 #endif // defined(ENABLE_WEBRTC) 2638 #endif // defined(ENABLE_WEBRTC)
2629 2639
2630 } // namespace chrome 2640 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698