| Index: Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
|
| diff --git a/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp b/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
|
| index 7ec61f6ff32a9318eab6a3f999aa8792d29a0174..e4987e5d74a753773b40e01291657df462d38dc5 100644
|
| --- a/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
|
| +++ b/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "bindings/core/v8/CallbackPromiseAdapter.h"
|
| #include "bindings/core/v8/ScriptPromiseResolver.h"
|
| +#include "core/page/PageVisibilityState.h"
|
| #include "core/page/WindowFocusAllowedIndicator.h"
|
| #include "modules/serviceworkers/ServiceWorkerError.h"
|
| #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
|
| @@ -23,6 +24,7 @@ ServiceWorkerWindowClient* ServiceWorkerWindowClient::create(const WebServiceWor
|
| ServiceWorkerWindowClient::ServiceWorkerWindowClient(const WebServiceWorkerClientInfo& info)
|
| : ServiceWorkerClient(info)
|
| , m_visibilityState(info.visibilityState)
|
| + , m_pageVisibilityState(info.pageVisibilityState)
|
| , m_isFocused(info.isFocused)
|
| , m_frameType(info.frameType)
|
| {
|
| @@ -32,6 +34,14 @@ ServiceWorkerWindowClient::~ServiceWorkerWindowClient()
|
| {
|
| }
|
|
|
| +String ServiceWorkerWindowClient::visibilityState() const
|
| +{
|
| + // FIXME: temporary until m_pageVisibilityState is used in Chromium.
|
| + if (m_pageVisibilityState == WebPageVisibilityStateLast)
|
| + return m_visibilityState;
|
| + return pageVisibilityStateString(static_cast<PageVisibilityState>(m_pageVisibilityState));
|
| +}
|
| +
|
| String ServiceWorkerWindowClient::frameType() const
|
| {
|
| DEFINE_STATIC_LOCAL(const String, auxiliary, ("auxiliary"));
|
|
|