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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorkerClient.h

Issue 1209493002: Service Worker: Surface Client.id attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update JS expression for truthiness. Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « Source/modules/serviceworkers/Client.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 10 matching lines...) Expand all
21 class MODULES_EXPORT ServiceWorkerClient : public GarbageCollectedFinalized<Serv iceWorkerClient>, public ScriptWrappable { 21 class MODULES_EXPORT ServiceWorkerClient : public GarbageCollectedFinalized<Serv iceWorkerClient>, public ScriptWrappable {
22 DEFINE_WRAPPERTYPEINFO(); 22 DEFINE_WRAPPERTYPEINFO();
23 public: 23 public:
24 static ServiceWorkerClient* create(const WebServiceWorkerClientInfo&); 24 static ServiceWorkerClient* create(const WebServiceWorkerClientInfo&);
25 25
26 virtual ~ServiceWorkerClient(); 26 virtual ~ServiceWorkerClient();
27 27
28 // Client.idl 28 // Client.idl
29 String url() const { return m_url; } 29 String url() const { return m_url; }
30 String frameType() const; 30 String frameType() const;
31 String id() const { return m_uuid; }
31 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag e, const MessagePortArray*, ExceptionState&); 32 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag e, const MessagePortArray*, ExceptionState&);
32 33
33 DEFINE_INLINE_VIRTUAL_TRACE() { } 34 DEFINE_INLINE_VIRTUAL_TRACE() { }
34 35
35 protected: 36 protected:
36 explicit ServiceWorkerClient(const WebServiceWorkerClientInfo&); 37 explicit ServiceWorkerClient(const WebServiceWorkerClientInfo&);
37 38
38 String uuid() const { return m_uuid; } 39 String uuid() const { return m_uuid; }
39 40
40 private: 41 private:
41 String m_uuid; 42 String m_uuid;
42 String m_url; 43 String m_url;
43 WebURLRequest::FrameType m_frameType; 44 WebURLRequest::FrameType m_frameType;
44 }; 45 };
45 46
46 } // namespace blink 47 } // namespace blink
47 48
48 #endif // ServiceWorkerClient_h 49 #endif // ServiceWorkerClient_h
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/Client.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698