OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Used only by Dedicated Worker. | 50 // Used only by Dedicated Worker. |
51 class WorkerObjectProxy FINAL : public WorkerReportingProxy { | 51 class WorkerObjectProxy FINAL : public WorkerReportingProxy { |
52 public: | 52 public: |
53 static PassOwnPtr<WorkerObjectProxy> create(ExecutionContext*, WorkerMessagi
ngProxy*); | 53 static PassOwnPtr<WorkerObjectProxy> create(ExecutionContext*, WorkerMessagi
ngProxy*); |
54 virtual ~WorkerObjectProxy() { } | 54 virtual ~WorkerObjectProxy() { } |
55 | 55 |
56 void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr
<MessagePortChannelArray>); | 56 void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr
<MessagePortChannelArray>); |
57 void postTaskToMainExecutionContext(PassOwnPtr<ExecutionContextTask>); | 57 void postTaskToMainExecutionContext(PassOwnPtr<ExecutionContextTask>); |
58 void confirmMessageFromWorkerObject(bool hasPendingActivity); | 58 void confirmMessageFromWorkerObject(bool hasPendingActivity); |
59 void reportPendingActivity(bool hasPendingActivity); | 59 void reportPendingActivity(bool hasPendingActivity); |
| 60 ExecutionContext* context() {return m_executionContext; } |
60 | 61 |
61 // WorkerReportingProxy overrides. | 62 // WorkerReportingProxy overrides. |
62 virtual void reportException(const String& errorMessage, int lineNumber, int
columnNumber, const String& sourceURL) OVERRIDE; | 63 virtual void reportException(const String& errorMessage, int lineNumber, int
columnNumber, const String& sourceURL) OVERRIDE; |
63 virtual void reportConsoleMessage(MessageSource, MessageLevel, const String&
message, int lineNumber, const String& sourceURL) OVERRIDE; | 64 virtual void reportConsoleMessage(MessageSource, MessageLevel, const String&
message, int lineNumber, const String& sourceURL) OVERRIDE; |
64 virtual void postMessageToPageInspector(const String&) OVERRIDE; | 65 virtual void postMessageToPageInspector(const String&) OVERRIDE; |
65 virtual void updateInspectorStateCookie(const String&) OVERRIDE; | 66 virtual void updateInspectorStateCookie(const String&) OVERRIDE; |
66 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) OVERRIDE { } | 67 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) OVERRIDE { } |
67 virtual void workerGlobalScopeClosed() OVERRIDE; | 68 virtual void workerGlobalScopeClosed() OVERRIDE; |
68 virtual void workerGlobalScopeDestroyed() OVERRIDE; | 69 virtual void workerGlobalScopeDestroyed() OVERRIDE; |
69 virtual void willDestroyWorkerGlobalScope() OVERRIDE { } | 70 virtual void willDestroyWorkerGlobalScope() OVERRIDE { } |
70 | 71 |
71 private: | 72 private: |
72 WorkerObjectProxy(ExecutionContext*, WorkerMessagingProxy*); | 73 WorkerObjectProxy(ExecutionContext*, WorkerMessagingProxy*); |
73 | 74 |
74 // These objects always outlive this proxy. | 75 // These objects always outlive this proxy. |
75 ExecutionContext* m_executionContext; | 76 ExecutionContext* m_executionContext; |
76 WorkerMessagingProxy* m_messagingProxy; | 77 WorkerMessagingProxy* m_messagingProxy; |
77 }; | 78 }; |
78 | 79 |
79 } // namespace blink | 80 } // namespace blink |
80 | 81 |
81 #endif // WorkerObjectProxy_h | 82 #endif // WorkerObjectProxy_h |
OLD | NEW |