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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2715173002: Final rename from FrameLoaderClient to LocalFrameClient: (Closed)
Patch Set: Created 3 years, 10 months 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/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 85a05ad63117f608f9640b94bc8c6170821654d3..ff0d2e0b570eddb1c6f04949f135b380990f0cb8 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -167,7 +167,7 @@ class PostMessageTimer final
static void updateSuddenTerminationStatus(
LocalDOMWindow* domWindow,
bool addedListener,
- FrameLoaderClient::SuddenTerminationDisablerType disablerType) {
+ LocalFrameClient::SuddenTerminationDisablerType disablerType) {
Platform::current()->suddenTerminationChanged(!addedListener);
if (domWindow->frame() && domWindow->frame()->loader().client())
domWindow->frame()->loader().client()->suddenTerminationDisablerChanged(
@@ -188,9 +188,10 @@ static DOMWindowSet& windowsWithBeforeUnloadEventListeners() {
static void addUnloadEventListener(LocalDOMWindow* domWindow) {
DOMWindowSet& set = windowsWithUnloadEventListeners();
- if (set.isEmpty())
+ if (set.isEmpty()) {
updateSuddenTerminationStatus(domWindow, true,
- FrameLoaderClient::UnloadHandler);
+ LocalFrameClient::UnloadHandler);
+ }
set.add(domWindow);
}
@@ -201,9 +202,10 @@ static void removeUnloadEventListener(LocalDOMWindow* domWindow) {
if (it == set.end())
return;
set.remove(it);
- if (set.isEmpty())
+ if (set.isEmpty()) {
updateSuddenTerminationStatus(domWindow, false,
- FrameLoaderClient::UnloadHandler);
+ LocalFrameClient::UnloadHandler);
+ }
}
static void removeAllUnloadEventListeners(LocalDOMWindow* domWindow) {
@@ -212,16 +214,18 @@ static void removeAllUnloadEventListeners(LocalDOMWindow* domWindow) {
if (it == set.end())
return;
set.removeAll(it);
- if (set.isEmpty())
+ if (set.isEmpty()) {
updateSuddenTerminationStatus(domWindow, false,
- FrameLoaderClient::UnloadHandler);
+ LocalFrameClient::UnloadHandler);
+ }
}
static void addBeforeUnloadEventListener(LocalDOMWindow* domWindow) {
DOMWindowSet& set = windowsWithBeforeUnloadEventListeners();
- if (set.isEmpty())
+ if (set.isEmpty()) {
updateSuddenTerminationStatus(domWindow, true,
- FrameLoaderClient::BeforeUnloadHandler);
+ LocalFrameClient::BeforeUnloadHandler);
+ }
set.add(domWindow);
}
@@ -232,9 +236,10 @@ static void removeBeforeUnloadEventListener(LocalDOMWindow* domWindow) {
if (it == set.end())
return;
set.remove(it);
- if (set.isEmpty())
+ if (set.isEmpty()) {
updateSuddenTerminationStatus(domWindow, false,
- FrameLoaderClient::BeforeUnloadHandler);
+ LocalFrameClient::BeforeUnloadHandler);
+ }
}
static void removeAllBeforeUnloadEventListeners(LocalDOMWindow* domWindow) {
@@ -243,9 +248,10 @@ static void removeAllBeforeUnloadEventListeners(LocalDOMWindow* domWindow) {
if (it == set.end())
return;
set.removeAll(it);
- if (set.isEmpty())
+ if (set.isEmpty()) {
updateSuddenTerminationStatus(domWindow, false,
- FrameLoaderClient::BeforeUnloadHandler);
+ LocalFrameClient::BeforeUnloadHandler);
+ }
}
static bool allowsBeforeUnloadListeners(LocalDOMWindow* window) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameClient.h ('k') | third_party/WebKit/Source/core/layout/LayoutTestHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698