Index: third_party/WebKit/Source/core/page/Page.h |
diff --git a/third_party/WebKit/Source/core/page/Page.h b/third_party/WebKit/Source/core/page/Page.h |
index 69e603bfc81921b7e1cc668dbaa8ee6dc62ee935..fd7153753ccc42a99de856b6d443518f00cb7222 100644 |
--- a/third_party/WebKit/Source/core/page/Page.h |
+++ b/third_party/WebKit/Source/core/page/Page.h |
@@ -60,6 +60,7 @@ class Frame; |
class FrameHost; |
class PluginData; |
class PointerLockController; |
+class ScopedPageSuspender; |
class ScrollingCoordinator; |
class Settings; |
class SpellCheckerClient; |
@@ -187,10 +188,13 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, |
return m_tabKeyCyclesThroughElements; |
} |
- // DefersLoading is used to delay loads during modal dialogs. |
- // Modal dialogs are supposed to freeze all background processes |
- // in the page, including prevent additional loads from staring/continuing. |
- void setSuspended(bool); |
+ // Suspension is used to implement the "Optionally, pause while waiting for |
+ // the user to acknowledge the message" step of simple dialog processing: |
+ // https://html.spec.whatwg.org/multipage/webappapis.html#simple-dialogs |
+ // |
+ // Per https://html.spec.whatwg.org/multipage/webappapis.html#pause, no loads |
+ // are allowed to start/continue in this state, and all background processing |
+ // is also suspended. |
bool suspended() const { return m_suspended; } |
void setPageScaleFactor(float); |
@@ -228,6 +232,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, |
void willBeDestroyed(); |
private: |
+ friend class ScopedPageSuspender; |
+ |
explicit Page(PageClients&); |
void initGroup(); |
@@ -235,6 +241,10 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, |
// SettingsDelegate overrides. |
void settingsChanged(SettingsDelegate::ChangeType) override; |
+ // ScopedPageSuspender helpers. |
+ void setSuspended(bool); |
+ static PageSet& willBeClosedOrdinaryPages(); |
+ |
Member<PageAnimator> m_animator; |
const Member<AutoscrollController> m_autoscrollController; |
Member<ChromeClient> m_chromeClient; |