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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerContainer.cpp

Issue 844733003: Use VisibilityState enum and move WebPageVisibilityState to public/platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sw_enum_stuff
Patch Set: SWContainer uses pageVisibilityState Created 5 years, 11 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
« no previous file with comments | « Source/core/dom/Document.idl ('k') | Source/modules/serviceworkers/ServiceWorkerWindowClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerContainer.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
index ff52ad683de54de5e0031347a4a524bceb6b27bb..69de78ab319de14a36fcc472a8534124e09c0b43 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -49,6 +49,7 @@
#include "modules/serviceworkers/ServiceWorkerError.h"
#include "modules/serviceworkers/ServiceWorkerRegistration.h"
#include "platform/RuntimeEnabledFeatures.h"
+#include "public/platform/WebPageVisibilityState.h"
#include "public/platform/WebServiceWorker.h"
#include "public/platform/WebServiceWorkerClientsInfo.h"
#include "public/platform/WebServiceWorkerProvider.h"
@@ -290,7 +291,9 @@ bool ServiceWorkerContainer::getClientInfo(WebServiceWorkerClientInfo* info)
if (!context || !context->isDocument())
return false;
Document* document = toDocument(context);
+ // FIXME: remove info->visibilityState when Chromium is updated.
info->visibilityState = document->visibilityState();
+ info->pageVisibilityState = static_cast<WebPageVisibilityState>(document->pageVisibilityState());
info->isFocused = document->hasFocus();
info->url = document->url();
if (!document->frame())
« no previous file with comments | « Source/core/dom/Document.idl ('k') | Source/modules/serviceworkers/ServiceWorkerWindowClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698