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

Side by Side Diff: third_party/WebKit/Source/web/WebSettingsImpl.cpp

Issue 2471153002: [scheduler] Use Finch to control background throttling. (Closed)
Patch Set: Fix test and address comments Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 : m_settings(settings), 45 : m_settings(settings),
46 m_devToolsEmulator(devToolsEmulator), 46 m_devToolsEmulator(devToolsEmulator),
47 m_showFPSCounter(false), 47 m_showFPSCounter(false),
48 m_showPaintRects(false), 48 m_showPaintRects(false),
49 m_renderVSyncNotificationEnabled(false), 49 m_renderVSyncNotificationEnabled(false),
50 m_autoZoomFocusedNodeToLegibleScale(false), 50 m_autoZoomFocusedNodeToLegibleScale(false),
51 m_supportDeprecatedTargetDensityDPI(false), 51 m_supportDeprecatedTargetDensityDPI(false),
52 m_shrinksViewportContentToFit(false), 52 m_shrinksViewportContentToFit(false),
53 m_viewportMetaLayoutSizeQuirk(false), 53 m_viewportMetaLayoutSizeQuirk(false),
54 m_viewportMetaNonUserScalableQuirk(false), 54 m_viewportMetaNonUserScalableQuirk(false),
55 m_clobberUserAgentInitialScaleQuirk(false) { 55 m_clobberUserAgentInitialScaleQuirk(false),
56 m_expensiveBackgroundThrottlingCPUBudget(-1),
57 m_expensiveBackgroundThrottlingInitialBudget(-1),
58 m_expensiveBackgroundThrottlingMaxBudget(-1),
59 m_expensiveBackgroundThrottlingMaxDelay(-1) {
56 DCHECK(settings); 60 DCHECK(settings);
57 } 61 }
58 62
59 void WebSettingsImpl::setFromStrings(const WebString& name, 63 void WebSettingsImpl::setFromStrings(const WebString& name,
60 const WebString& value) { 64 const WebString& value) {
61 m_settings->setFromStrings(name, value); 65 m_settings->setFromStrings(name, value);
62 } 66 }
63 67
64 void WebSettingsImpl::setStandardFontFamily(const WebString& font, 68 void WebSettingsImpl::setStandardFontFamily(const WebString& font,
65 UScriptCode script) { 69 UScriptCode script) {
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 void WebSettingsImpl::setV8CacheStrategiesForCacheStorage( 688 void WebSettingsImpl::setV8CacheStrategiesForCacheStorage(
685 V8CacheStrategiesForCacheStorage strategies) { 689 V8CacheStrategiesForCacheStorage strategies) {
686 m_settings->setV8CacheStrategiesForCacheStorage( 690 m_settings->setV8CacheStrategiesForCacheStorage(
687 static_cast<blink::V8CacheStrategiesForCacheStorage>(strategies)); 691 static_cast<blink::V8CacheStrategiesForCacheStorage>(strategies));
688 } 692 }
689 693
690 void WebSettingsImpl::setViewportStyle(WebViewportStyle style) { 694 void WebSettingsImpl::setViewportStyle(WebViewportStyle style) {
691 m_devToolsEmulator->setViewportStyle(style); 695 m_devToolsEmulator->setViewportStyle(style);
692 } 696 }
693 697
698 void WebSettingsImpl::setExpensiveBackgroundThrottlingCPUBudget(
699 float cpuBudget) {
700 m_expensiveBackgroundThrottlingCPUBudget = cpuBudget;
701 }
702
703 void WebSettingsImpl::setExpensiveBackgroundThrottlingInitialBudget(
704 float initialBudget) {
705 m_expensiveBackgroundThrottlingInitialBudget = initialBudget;
706 }
707
708 void WebSettingsImpl::setExpensiveBackgroundThrottlingMaxBudget(
709 float maxBudget) {
710 m_expensiveBackgroundThrottlingMaxBudget = maxBudget;
711 }
712
713 void WebSettingsImpl::setExpensiveBackgroundThrottlingMaxDelay(float maxDelay) {
714 m_expensiveBackgroundThrottlingMaxDelay = maxDelay;
715 }
716
694 } // namespace blink 717 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSettingsImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698