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

Unified Diff: Source/modules/serviceworkers/WindowClient.idl

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/modules/serviceworkers/ServiceWorkerWindowClient.cpp ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/WindowClient.idl
diff --git a/Source/modules/serviceworkers/WindowClient.idl b/Source/modules/serviceworkers/WindowClient.idl
index cc286146a4edb07400ce0e6f14e55f8c58270bc6..67e2fb20133cf71ad608e443818beb88dabd8701 100644
--- a/Source/modules/serviceworkers/WindowClient.idl
+++ b/Source/modules/serviceworkers/WindowClient.idl
@@ -10,6 +10,9 @@ enum ContextFrameType {
"none"
};
+// http://www.w3.org/TR/page-visibility/#VisibilityState
+enum VisibilityState { "hidden", "visible", "prerender", "unloaded" };
+
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#window-client-interface
[
Exposed=ServiceWorker,
@@ -18,7 +21,7 @@ enum ContextFrameType {
TypeChecking=Interface,
ImplementedAs=ServiceWorkerWindowClient,
] interface WindowClient : Client {
- readonly attribute DOMString visibilityState;
+ readonly attribute VisibilityState visibilityState;
readonly attribute boolean focused;
readonly attribute ContextFrameType frameType;
[CallWith=ScriptState] Promise<boolean> focus();
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698