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

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

Issue 1164753004: Tidy up CompositorWorkerManager unit tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: compile fix 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 | Annotate | Revision Log
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class ConsoleMessage; 42 class ConsoleMessage;
43 class ExecutionContext; 43 class ExecutionContext;
44 class ExecutionContextTask; 44 class ExecutionContextTask;
45 class WorkerMessagingProxy; 45 class WorkerMessagingProxy;
46 46
47 // A proxy to talk to the worker object. This object is created on the 47 // A proxy to talk to the worker object. This object is created on the
48 // worker object thread (i.e. usually the main thread), passed on to 48 // worker object thread (i.e. usually the main thread), passed on to
49 // the worker thread, and used just to proxy messages to the 49 // the worker thread, and used just to proxy messages to the
50 // WorkerMessagingProxy on the worker object thread. 50 // WorkerMessagingProxy on the worker object thread.
51 // 51 //
52 // Used only by Dedicated Worker. 52 // Used only by Dedicated Worker.
kinuko 2015/06/08 04:36:58 Looks like this comment is stale, could we update?
sof 2015/06/08 08:18:16 Certainly, done.
53 class CORE_EXPORT WorkerObjectProxy final : public WorkerReportingProxy { 53 class CORE_EXPORT WorkerObjectProxy : public WorkerReportingProxy {
54 public: 54 public:
55 static PassOwnPtr<WorkerObjectProxy> create(ExecutionContext*, WorkerMessagi ngProxy*); 55 static PassOwnPtr<WorkerObjectProxy> create(ExecutionContext*, WorkerMessagi ngProxy*);
kinuko 2015/06/08 04:36:59 Could we have ASSERT(!messagingProxy) in .cc so th
sof 2015/06/08 08:18:16 That's well worth it, now done.
56 virtual ~WorkerObjectProxy() { } 56 virtual ~WorkerObjectProxy() { }
57 57
58 void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr <MessagePortChannelArray>); 58 void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr <MessagePortChannelArray>);
59 void postTaskToMainExecutionContext(PassOwnPtr<ExecutionContextTask>); 59 void postTaskToMainExecutionContext(PassOwnPtr<ExecutionContextTask>);
60 void confirmMessageFromWorkerObject(bool hasPendingActivity); 60 void confirmMessageFromWorkerObject(bool hasPendingActivity);
61 void reportPendingActivity(bool hasPendingActivity); 61 void reportPendingActivity(bool hasPendingActivity);
62 62
63 // WorkerReportingProxy overrides. 63 // WorkerReportingProxy overrides.
64 virtual void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, int exceptionId) override; 64 virtual void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, int exceptionId) override;
65 virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) ov erride; 65 virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) ov erride;
66 virtual void postMessageToPageInspector(const String&) override; 66 virtual void postMessageToPageInspector(const String&) override;
67 virtual void postWorkerConsoleAgentEnabled() override; 67 virtual void postWorkerConsoleAgentEnabled() override;
68 virtual void didEvaluateWorkerScript(bool success) override { }; 68 virtual void didEvaluateWorkerScript(bool success) override { };
69 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) override { } 69 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) override { }
70 virtual void workerGlobalScopeClosed() override; 70 virtual void workerGlobalScopeClosed() override;
71 virtual void workerThreadTerminated() override; 71 virtual void workerThreadTerminated() override;
72 virtual void willDestroyWorkerGlobalScope() override { } 72 virtual void willDestroyWorkerGlobalScope() override { }
73 73
74 private: 74 protected:
75 WorkerObjectProxy(ExecutionContext*, WorkerMessagingProxy*); 75 WorkerObjectProxy(ExecutionContext*, WorkerMessagingProxy*);
76 76
77 private:
77 // These objects always outlive this proxy. 78 // These objects always outlive this proxy.
78 ExecutionContext* m_executionContext; 79 ExecutionContext* m_executionContext;
79 WorkerMessagingProxy* m_messagingProxy; 80 WorkerMessagingProxy* m_messagingProxy;
80 }; 81 };
81 82
82 } // namespace blink 83 } // namespace blink
83 84
84 #endif // WorkerObjectProxy_h 85 #endif // WorkerObjectProxy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698