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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/public/platform/WebScheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 2c685304358d95ccad52de936e3b62ffd660cd0a..57ad9a13f0afb96cb11c5a697bd9330db421b35d 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -435,7 +435,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
m_scheduler(wrapUnique(Platform::current()
->currentThread()
->scheduler()
- ->createWebViewScheduler(this)
+ ->createWebViewScheduler(this, this)
.release())),
m_lastFrameTimeMonotonic(0),
m_overrideCompositorVisibility(false) {
@@ -1098,6 +1098,22 @@ void WebViewImpl::ReportIntervention(const WebString& message) {
mainFrame()->addMessageToConsole(consoleMessage);
}
+float WebViewImpl::expensiveBackgroundThrottlingCPUBudget() {
+ return settingsImpl()->expensiveBackgroundThrottlingCPUBudget();
+}
+
+float WebViewImpl::expensiveBackgroundThrottlingInitialBudget() {
+ return settingsImpl()->expensiveBackgroundThrottlingInitialBudget();
+}
+
+float WebViewImpl::expensiveBackgroundThrottlingMaxBudget() {
+ return settingsImpl()->expensiveBackgroundThrottlingMaxBudget();
+}
+
+float WebViewImpl::expensiveBackgroundThrottlingMaxDelay() {
+ return settingsImpl()->expensiveBackgroundThrottlingMaxDelay();
+}
+
WebInputEventResult WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) {
DCHECK((event.type == WebInputEvent::RawKeyDown) ||
(event.type == WebInputEvent::KeyDown) ||
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/public/platform/WebScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698