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

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

Issue 177073004: Oilpan: move core/workers to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * 24 *
25 */ 25 */
26 26
27 #ifndef WorkerMessagingProxy_h 27 #ifndef WorkerMessagingProxy_h
28 #define WorkerMessagingProxy_h 28 #define WorkerMessagingProxy_h
29 29
30 #include "core/dom/ExecutionContext.h" 30 #include "core/dom/ExecutionContext.h"
31 #include "core/workers/WorkerGlobalScopeProxy.h" 31 #include "core/workers/WorkerGlobalScopeProxy.h"
32 #include "core/workers/WorkerLoaderProxy.h" 32 #include "core/workers/WorkerLoaderProxy.h"
33 #include "heap/Handle.h"
33 #include "wtf/Forward.h" 34 #include "wtf/Forward.h"
34 #include "wtf/Noncopyable.h" 35 #include "wtf/Noncopyable.h"
35 #include "wtf/PassOwnPtr.h" 36 #include "wtf/PassOwnPtr.h"
36 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
37 #include "wtf/RefPtr.h" 38 #include "wtf/RefPtr.h"
38 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
39 40
40 namespace WebCore { 41 namespace WebCore {
41 42
42 class WorkerObjectProxy; 43 class WorkerObjectProxy;
(...skipping 28 matching lines...) Expand all
71 void reportPendingActivity(bool hasPendingActivity); 72 void reportPendingActivity(bool hasPendingActivity);
72 void workerGlobalScopeClosed(); 73 void workerGlobalScopeClosed();
73 void workerGlobalScopeDestroyed(); 74 void workerGlobalScopeDestroyed();
74 75
75 // Implementation of WorkerLoaderProxy. 76 // Implementation of WorkerLoaderProxy.
76 // These methods are called on different threads to schedule loading 77 // These methods are called on different threads to schedule loading
77 // requests and to send callbacks back to WorkerGlobalScope. 78 // requests and to send callbacks back to WorkerGlobalScope.
78 virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) OVERRIDE ; 79 virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) OVERRIDE ;
79 virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask >) OVERRIDE; 80 virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask >) OVERRIDE;
80 81
81 void workerThreadCreated(PassRefPtr<DedicatedWorkerThread>); 82 void workerThreadCreated(PassRefPtrWillBeRawPtr<DedicatedWorkerThread>);
82 83
83 protected: 84 protected:
84 virtual ~WorkerMessagingProxy(); 85 virtual ~WorkerMessagingProxy();
85 86
86 private: 87 private:
87 static void workerObjectDestroyedInternal(ExecutionContext*, WorkerMessa gingProxy*); 88 static void workerObjectDestroyedInternal(ExecutionContext*, WorkerMessa gingProxy*);
88 89
89 RefPtr<ExecutionContext> m_executionContext; 90 RefPtr<ExecutionContext> m_executionContext;
90 OwnPtr<WorkerObjectProxy> m_workerObjectProxy; 91 OwnPtr<WorkerObjectProxy> m_workerObjectProxy;
91 Worker* m_workerObject; 92 Worker* m_workerObject;
92 bool m_mayBeDestroyed; 93 bool m_mayBeDestroyed;
93 RefPtr<DedicatedWorkerThread> m_workerThread; 94 RefPtrWillBePersistent<DedicatedWorkerThread> m_workerThread;
94 95
95 unsigned m_unconfirmedMessageCount; // Unconfirmed messages from worker object to worker thread. 96 unsigned m_unconfirmedMessageCount; // Unconfirmed messages from worker object to worker thread.
96 bool m_workerThreadHadPendingActivity; // The latest confirmation from w orker thread reported that it was still active. 97 bool m_workerThreadHadPendingActivity; // The latest confirmation from w orker thread reported that it was still active.
97 98
98 bool m_askedToTerminate; 99 bool m_askedToTerminate;
99 100
100 Vector<OwnPtr<ExecutionContextTask> > m_queuedEarlyTasks; // Tasks are q ueued here until there's a thread object created. 101 Vector<OwnPtr<ExecutionContextTask> > m_queuedEarlyTasks; // Tasks are q ueued here until there's a thread object created.
101 WorkerGlobalScopeProxy::PageInspector* m_pageInspector; 102 WorkerGlobalScopeProxy::PageInspector* m_pageInspector;
102 103
103 OwnPtr<WorkerClients> m_workerClients; 104 OwnPtr<WorkerClients> m_workerClients;
104 }; 105 };
105 106
106 } // namespace WebCore 107 } // namespace WebCore
107 108
108 #endif // WorkerMessagingProxy_h 109 #endif // WorkerMessagingProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698