| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ServiceWorkerWindowClient_h | 5 #ifndef ServiceWorkerWindowClient_h |
| 6 #define ServiceWorkerWindowClient_h | 6 #define ServiceWorkerWindowClient_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "modules/serviceworkers/ServiceWorkerClient.h" | 10 #include "modules/serviceworkers/ServiceWorkerClient.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 static ServiceWorkerWindowClient* take(ScriptPromiseResolver*, PassOwnPtr<We
bType>); | 26 static ServiceWorkerWindowClient* take(ScriptPromiseResolver*, PassOwnPtr<We
bType>); |
| 27 | 27 |
| 28 static ServiceWorkerWindowClient* create(const WebServiceWorkerClientInfo&); | 28 static ServiceWorkerWindowClient* create(const WebServiceWorkerClientInfo&); |
| 29 ~ServiceWorkerWindowClient() override; | 29 ~ServiceWorkerWindowClient() override; |
| 30 | 30 |
| 31 // WindowClient.idl | 31 // WindowClient.idl |
| 32 String visibilityState() const; | 32 String visibilityState() const; |
| 33 bool focused() const { return m_isFocused; } | 33 bool focused() const { return m_isFocused; } |
| 34 ScriptPromise focus(ScriptState*); | 34 ScriptPromise focus(ScriptState*); |
| 35 ScriptPromise navigate(ScriptState*, const String& url); |
| 35 | 36 |
| 36 DECLARE_VIRTUAL_TRACE(); | 37 DECLARE_VIRTUAL_TRACE(); |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 explicit ServiceWorkerWindowClient(const WebServiceWorkerClientInfo&); | 40 explicit ServiceWorkerWindowClient(const WebServiceWorkerClientInfo&); |
| 40 | 41 |
| 41 WebPageVisibilityState m_pageVisibilityState; | 42 WebPageVisibilityState m_pageVisibilityState; |
| 42 bool m_isFocused; | 43 bool m_isFocused; |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace blink | 46 } // namespace blink |
| 46 | 47 |
| 47 #endif // ServiceWorkerWindowClient_h | 48 #endif // ServiceWorkerWindowClient_h |
| OLD | NEW |