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

Unified Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2527143002: Suspend frame schedulers on a page suspension (Closed)
Patch Set: mod a comment Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 9f0f41c7b54da782a8403ff3ba28394b572689b2..bcc4c7944f597920d7f7e1e3a8638cb9c095e1af 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -56,6 +56,7 @@
#include "platform/graphics/GraphicsLayer.h"
#include "platform/plugins/PluginData.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebFrameScheduler.h"
namespace blink {
@@ -253,15 +254,18 @@ void Page::setValidationMessageClient(ValidationMessageClient* client) {
m_validationMessageClient = client;
}
-void Page::setSuspended(bool suspend) {
- if (suspend == m_suspended)
+void Page::setSuspended(bool suspended) {
+ if (suspended == m_suspended)
return;
- m_suspended = suspend;
+ m_suspended = suspended;
for (Frame* frame = mainFrame(); frame;
frame = frame->tree().traverseNext()) {
- if (frame->isLocalFrame())
- toLocalFrame(frame)->loader().setDefersLoading(suspend);
+ if (!frame->isLocalFrame())
+ continue;
+ LocalFrame* localFrame = toLocalFrame(frame);
+ localFrame->loader().setDefersLoading(suspended);
+ localFrame->frameScheduler()->setSuspended(suspended);
}
}

Powered by Google App Engine
This is Rietveld 408576698