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

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

Issue 2526163002: Rename blink::Page's load deferral to suspension (Closed)
Patch Set: 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
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 a0a1c592ffbd5d17c7dfc2469724bf49c74f3009..9f0f41c7b54da782a8403ff3ba28394b572689b2 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -49,7 +49,7 @@
#include "core/page/DragController.h"
#include "core/page/FocusController.h"
#include "core/page/PointerLockController.h"
-#include "core/page/ScopedPageLoadDeferrer.h"
+#include "core/page/ScopedPageSuspender.h"
#include "core/page/ValidationMessageClient.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/paint/PaintLayer.h"
@@ -105,8 +105,8 @@ float deviceScaleFactor(LocalFrame* frame) {
Page* Page::createOrdinary(PageClients& pageClients) {
Page* page = create(pageClients);
ordinaryPages().add(page);
- if (ScopedPageLoadDeferrer::isActive())
- page->setDefersLoading(true);
+ if (ScopedPageSuspender::isActive())
+ page->setSuspended(true);
return page;
}
@@ -130,7 +130,7 @@ Page::Page(PageClients& pageClients)
: UseCounter::DefaultContext),
m_openedByDOM(false),
m_tabKeyCyclesThroughElements(true),
- m_defersLoading(false),
+ m_suspended(false),
m_deviceScaleFactor(1),
m_visibilityState(PageVisibilityStateVisible),
m_isCursorVisible(true),
@@ -253,15 +253,15 @@ void Page::setValidationMessageClient(ValidationMessageClient* client) {
m_validationMessageClient = client;
}
-void Page::setDefersLoading(bool defers) {
- if (defers == m_defersLoading)
+void Page::setSuspended(bool suspend) {
+ if (suspend == m_suspended)
return;
- m_defersLoading = defers;
+ m_suspended = suspend;
for (Frame* frame = mainFrame(); frame;
frame = frame->tree().traverseNext()) {
if (frame->isLocalFrame())
- toLocalFrame(frame)->loader().setDefersLoading(defers);
+ toLocalFrame(frame)->loader().setDefersLoading(suspend);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.h ('k') | third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698