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

Side by Side Diff: Source/core/workers/UIWorkerGlobalScope.h

Issue 474683003: Not for review - Rebase of crrev.com/62833003 Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/UIWorker.idl ('k') | Source/core/workers/UIWorkerGlobalScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef DedicatedWorkerGlobalScope_h 31 #ifndef UIWorkerGlobalScope_h
32 #define DedicatedWorkerGlobalScope_h 32 #define UIWorkerGlobalScope_h
33 33
34 #include "core/dom/MessagePort.h" 34 #include "core/dom/MessagePort.h"
35 #include "core/frame/csp/ContentSecurityPolicy.h" 35 #include "core/frame/csp/ContentSecurityPolicy.h"
36 #include "core/workers/TeleportCallback.h"
37 #include "core/workers/TeleportContext.h"
36 #include "core/workers/WorkerGlobalScope.h" 38 #include "core/workers/WorkerGlobalScope.h"
37 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
38 40
39 namespace blink { 41 namespace blink {
40 42
41 class DedicatedWorkerThread; 43 class UIWorkerThread;
44 class WebTeleportCallback;
42 class WorkerThreadStartupData; 45 class WorkerThreadStartupData;
43 46
44 class DedicatedWorkerGlobalScope final : public WorkerGlobalScope { 47 class UIWorkerGlobalScope final : public WorkerGlobalScope {
45 DEFINE_WRAPPERTYPEINFO(); 48 DEFINE_WRAPPERTYPEINFO();
46 public: 49 public:
47 typedef WorkerGlobalScope Base; 50 typedef WorkerGlobalScope Base;
48 static PassRefPtrWillBeRawPtr<DedicatedWorkerGlobalScope> create(DedicatedWo rkerThread*, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData>, double timeOrigin) ; 51 static PassRefPtrWillBeRawPtr<UIWorkerGlobalScope> create(UIWorkerThread*, P assOwnPtrWillBeRawPtr<WorkerThreadStartupData>, double timeOrigin);
49 virtual ~DedicatedWorkerGlobalScope(); 52 virtual ~UIWorkerGlobalScope();
50 53
51 virtual bool isDedicatedWorkerGlobalScope() const override { return true; } 54 virtual bool isUIWorkerGlobalScope() const override { return true; }
52 virtual void countFeature(UseCounter::Feature) const override; 55 virtual void countFeature(UseCounter::Feature) const override;
53 virtual void countDeprecation(UseCounter::Feature) const override; 56 virtual void countDeprecation(UseCounter::Feature) const override;
54 57
55 // Overridden to allow us to check our pending activity after executing impo rted script. 58 // Overridden to allow us to check our pending activity after executing impo rted script.
56 virtual void importScripts(const Vector<String>& urls, ExceptionState&) over ride; 59 virtual void importScripts(const Vector<String>& urls, ExceptionState&) over ride;
57 60
58 // EventTarget 61 // EventTarget
59 virtual const AtomicString& interfaceName() const override; 62 virtual const AtomicString& interfaceName() const override;
60 63
61 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionState&); 64 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionState&);
62 65
63 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 66 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
64 67
65 DedicatedWorkerThread* thread() const; 68 void teleportMessage(PassRefPtrWillBeRawPtr<TeleportContext>, TeleportCallba ck*, ExceptionState&);
69
70 UIWorkerThread* thread() const;
66 71
67 virtual void trace(Visitor*) override; 72 virtual void trace(Visitor*) override;
68 73
69 private: 74 private:
70 DedicatedWorkerGlobalScope(const KURL&, const String& userAgent, DedicatedWo rkerThread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<Wo rkerClients>); 75 UIWorkerGlobalScope(const KURL&, const String& userAgent, UIWorkerThread*, d ouble timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>);
76
77 Vector<OwnPtr<WebTeleportCallback> > m_callbacks;
71 }; 78 };
72 79
73 } // namespace blink 80 } // namespace blink
74 81
75 #endif // DedicatedWorkerGlobalScope_h 82 #endif // UIWorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/core/workers/UIWorker.idl ('k') | Source/core/workers/UIWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698