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 ServiceWorkerClient_h | 5 #ifndef ServiceWorkerClient_h |
6 #define ServiceWorkerClient_h | 6 #define ServiceWorkerClient_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "bindings/core/v8/SerializedScriptValue.h" | 10 #include "bindings/core/v8/SerializedScriptValue.h" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
12 #include "public/platform/WebServiceWorkerClientsInfo.h" | 12 #include "public/platform/WebServiceWorkerClientsInfo.h" |
13 #include "wtf/Forward.h" | 13 #include "wtf/Forward.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class ExecutionContext; | 17 class ExecutionContext; |
18 class ScriptState; | 18 class ScriptState; |
19 | 19 |
20 class ServiceWorkerClient : public GarbageCollectedFinalized<ServiceWorkerClient
>, public ScriptWrappable { | 20 class ServiceWorkerClient : public GarbageCollectedFinalized<ServiceWorkerClient
>, public ScriptWrappable { |
21 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
22 public: | 22 public: |
23 static ServiceWorkerClient* create(const WebServiceWorkerClientInfo&); | 23 static ServiceWorkerClient* create(const WebServiceWorkerClientInfo&); |
24 | 24 |
25 virtual ~ServiceWorkerClient(); | 25 virtual ~ServiceWorkerClient(); |
26 | 26 |
27 // Client.idl | 27 // Client.idl |
28 String url() const { return m_url; } | 28 String url() const { return m_url; } |
| 29 String frameType() const; |
29 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray*, ExceptionState&); | 30 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag
e, const MessagePortArray*, ExceptionState&); |
30 | 31 |
31 DEFINE_INLINE_VIRTUAL_TRACE() { } | 32 DEFINE_INLINE_VIRTUAL_TRACE() { } |
32 | 33 |
33 protected: | 34 protected: |
34 explicit ServiceWorkerClient(const WebServiceWorkerClientInfo&); | 35 explicit ServiceWorkerClient(const WebServiceWorkerClientInfo&); |
35 | 36 |
36 String uuid() const { return m_uuid; } | 37 String uuid() const { return m_uuid; } |
37 | 38 |
38 private: | 39 private: |
39 String m_uuid; | 40 String m_uuid; |
40 String m_url; | 41 String m_url; |
| 42 WebURLRequest::FrameType m_frameType; |
41 }; | 43 }; |
42 | 44 |
43 } // namespace blink | 45 } // namespace blink |
44 | 46 |
45 #endif // ServiceWorkerClient_h | 47 #endif // ServiceWorkerClient_h |
OLD | NEW |