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/serviceworkers/ServiceWorkerClient.h" | 9 #include "modules/serviceworkers/ServiceWorkerClient.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 static ServiceWorkerWindowClient* take(ScriptPromiseResolver*, WebType*); | 24 static ServiceWorkerWindowClient* take(ScriptPromiseResolver*, WebType*); |
25 static void dispose(WebType*); | 25 static void dispose(WebType*); |
26 | 26 |
27 static ServiceWorkerWindowClient* create(const WebServiceWorkerClientInfo&); | 27 static ServiceWorkerWindowClient* create(const WebServiceWorkerClientInfo&); |
28 ~ServiceWorkerWindowClient() override; | 28 ~ServiceWorkerWindowClient() override; |
29 | 29 |
30 // WindowClient.idl | 30 // WindowClient.idl |
31 String visibilityState() const; | 31 String visibilityState() const; |
32 bool focused() const { return m_isFocused; } | 32 bool focused() const { return m_isFocused; } |
33 String frameType() const; | |
34 ScriptPromise focus(ScriptState*); | 33 ScriptPromise focus(ScriptState*); |
35 | 34 |
36 DECLARE_VIRTUAL_TRACE(); | 35 DECLARE_VIRTUAL_TRACE(); |
37 | 36 |
38 private: | 37 private: |
39 explicit ServiceWorkerWindowClient(const WebServiceWorkerClientInfo&); | 38 explicit ServiceWorkerWindowClient(const WebServiceWorkerClientInfo&); |
40 | 39 |
41 WebPageVisibilityState m_pageVisibilityState; | 40 WebPageVisibilityState m_pageVisibilityState; |
42 bool m_isFocused; | 41 bool m_isFocused; |
43 WebURLRequest::FrameType m_frameType; | |
44 }; | 42 }; |
45 | 43 |
46 } // namespace blink | 44 } // namespace blink |
47 | 45 |
48 #endif // ServiceWorkerWindowClient_h | 46 #endif // ServiceWorkerWindowClient_h |
OLD | NEW |