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

Side by Side Diff: third_party/WebKit/Source/core/workers/DedicatedWorkerThread.h

Issue 2718643002: Worker: Pass ParentFrameTaskRunners via WorkerThread::start() instead of the ctor (Closed)
Patch Set: Created 3 years, 9 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
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 25 matching lines...) Expand all
36 namespace blink { 36 namespace blink {
37 37
38 class InProcessWorkerObjectProxy; 38 class InProcessWorkerObjectProxy;
39 class WorkerThreadStartupData; 39 class WorkerThreadStartupData;
40 40
41 class CORE_EXPORT DedicatedWorkerThread : public WorkerThread { 41 class CORE_EXPORT DedicatedWorkerThread : public WorkerThread {
42 public: 42 public:
43 static std::unique_ptr<DedicatedWorkerThread> create( 43 static std::unique_ptr<DedicatedWorkerThread> create(
44 PassRefPtr<WorkerLoaderProxy>, 44 PassRefPtr<WorkerLoaderProxy>,
45 InProcessWorkerObjectProxy&, 45 InProcessWorkerObjectProxy&,
46 ParentFrameTaskRunners*,
47 double timeOrigin); 46 double timeOrigin);
48 ~DedicatedWorkerThread() override; 47 ~DedicatedWorkerThread() override;
49 48
50 WorkerBackingThread& workerBackingThread() override { 49 WorkerBackingThread& workerBackingThread() override {
51 return *m_workerBackingThread; 50 return *m_workerBackingThread;
52 } 51 }
53 void clearWorkerBackingThread() override; 52 void clearWorkerBackingThread() override;
54 InProcessWorkerObjectProxy& workerObjectProxy() const { 53 InProcessWorkerObjectProxy& workerObjectProxy() const {
55 return m_workerObjectProxy; 54 return m_workerObjectProxy;
56 } 55 }
57 56
58 protected: 57 protected:
59 DedicatedWorkerThread(PassRefPtr<WorkerLoaderProxy>, 58 DedicatedWorkerThread(PassRefPtr<WorkerLoaderProxy>,
60 InProcessWorkerObjectProxy&, 59 InProcessWorkerObjectProxy&,
61 ParentFrameTaskRunners*,
62 double timeOrigin); 60 double timeOrigin);
63 WorkerOrWorkletGlobalScope* createWorkerGlobalScope( 61 WorkerOrWorkletGlobalScope* createWorkerGlobalScope(
64 std::unique_ptr<WorkerThreadStartupData>) override; 62 std::unique_ptr<WorkerThreadStartupData>) override;
65 63
66 private: 64 private:
67 friend class DedicatedWorkerThreadForTest; 65 friend class DedicatedWorkerThreadForTest;
68 66
69 std::unique_ptr<WorkerBackingThread> m_workerBackingThread; 67 std::unique_ptr<WorkerBackingThread> m_workerBackingThread;
70 InProcessWorkerObjectProxy& m_workerObjectProxy; 68 InProcessWorkerObjectProxy& m_workerObjectProxy;
71 double m_timeOrigin; 69 double m_timeOrigin;
72 }; 70 };
73 71
74 } // namespace blink 72 } // namespace blink
75 73
76 #endif // DedicatedWorkerThread_h 74 #endif // DedicatedWorkerThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698