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

Side by Side Diff: webkit/api/public/WebWorkerClient.h

Issue 173193: Updating Worker.postMessage(), DOMWindow.postMessage(), and... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « webkit/api/public/WebWorker.h ('k') | webkit/api/src/PlatformMessagePortChannel.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 13 matching lines...) Expand all
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 WebWorkerClient_h 31 #ifndef WebWorkerClient_h
32 #define WebWorkerClient_h 32 #define WebWorkerClient_h
33 33
34 #include "WebCommon.h" 34 #include "WebMessagePortChannel.h"
35 35
36 namespace WebKit { 36 namespace WebKit {
37 class WebMessagePortChannel;
38 class WebString; 37 class WebString;
39 class WebWorker; 38 class WebWorker;
40 39
41 // Provides an interface back to the in-page script object for a worker. 40 // Provides an interface back to the in-page script object for a worker.
42 // All functions are expected to be called back on the thread that created 41 // All functions are expected to be called back on the thread that created
43 // the Worker object, unless noted. 42 // the Worker object, unless noted.
44 class WebWorkerClient { 43 class WebWorkerClient {
45 public: 44 public:
46 virtual void postMessageToWorkerObject(const WebString&, 45 virtual void postMessageToWorkerObject(
47 WebMessagePortChannel*) = 0; 46 const WebString&,
47 const WebMessagePortChannelArray&) = 0;
48 48
49 virtual void postExceptionToWorkerObject( 49 virtual void postExceptionToWorkerObject(
50 const WebString& errorString, int lineNumber, 50 const WebString& errorString, int lineNumber,
51 const WebString& sourceURL) = 0; 51 const WebString& sourceURL) = 0;
52 52
53 virtual void postConsoleMessageToWorkerObject( 53 virtual void postConsoleMessageToWorkerObject(
54 int destinationIdentifier, 54 int destinationIdentifier,
55 int sourceIdentifier, 55 int sourceIdentifier,
56 int messageType, 56 int messageType,
57 int messageLevel, 57 int messageLevel,
58 const WebString& message, 58 const WebString& message,
59 int lineNumber, 59 int lineNumber,
60 const WebString& sourceURL) = 0; 60 const WebString& sourceURL) = 0;
61 61
62 virtual void confirmMessageFromWorkerObject(bool hasPendingActivity) = 0; 62 virtual void confirmMessageFromWorkerObject(bool hasPendingActivity) = 0;
63 virtual void reportPendingActivity(bool hasPendingActivity) = 0; 63 virtual void reportPendingActivity(bool hasPendingActivity) = 0;
64 64
65 virtual void workerContextDestroyed() = 0; 65 virtual void workerContextDestroyed() = 0;
66 66
67 // This can be called on any thread to create a nested worker. 67 // This can be called on any thread to create a nested worker.
68 virtual WebWorker* createWorker(WebWorkerClient* client) = 0; 68 virtual WebWorker* createWorker(WebWorkerClient* client) = 0;
69 69
70 protected: 70 protected:
71 ~WebWorkerClient() { } 71 ~WebWorkerClient() { }
72 }; 72 };
73 73
74 } // namespace WebKit 74 } // namespace WebKit
75 75
76 #endif 76 #endif
OLDNEW
« no previous file with comments | « webkit/api/public/WebWorker.h ('k') | webkit/api/src/PlatformMessagePortChannel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698