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

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

Issue 779563003: [POC-WIP] Link window focus tokens with ExecutionContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
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/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/core/v8/SerializedScriptValue.h" 10 #include "bindings/core/v8/SerializedScriptValue.h"
10 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
11 #include "wtf/Forward.h" 12 #include "wtf/Forward.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
16 class ExecutionContext;
17 class ScriptState;
18
15 class ServiceWorkerClient final : public GarbageCollected<ServiceWorkerClient>, public ScriptWrappable { 19 class ServiceWorkerClient final : public GarbageCollected<ServiceWorkerClient>, public ScriptWrappable {
16 DEFINE_WRAPPERTYPEINFO(); 20 DEFINE_WRAPPERTYPEINFO();
17 public: 21 public:
18 static ServiceWorkerClient* create(unsigned id); 22 static ServiceWorkerClient* create(unsigned id);
19 23
20 // ServiceWorkerClient.idl 24 // ServiceWorkerClient.idl
21 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag e, const MessagePortArray*, ExceptionState&); 25 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag e, const MessagePortArray*, ExceptionState&);
26 ScriptPromise focus(ScriptState*);
22 27
23 void trace(Visitor*) { } 28 void trace(Visitor*) { }
24 29
25 private: 30 private:
26 explicit ServiceWorkerClient(unsigned id); 31 explicit ServiceWorkerClient(unsigned id);
27 32
28 unsigned m_id; 33 unsigned m_id;
29 }; 34 };
30 35
31 } // namespace blink 36 } // namespace blink
32 37
33 #endif // ServiceWorkerClient_h 38 #endif // ServiceWorkerClient_h
OLDNEW
« no previous file with comments | « Source/core/dom/ExecutionContext.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698