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

Side by Side Diff: webkit/tools/test_shell/test_web_worker.h

Issue 7477027: Support Transferable objects (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update for interface changes. Created 9 years, 4 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 | « content/worker/webworkerclient_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEB_WORKER_H_ 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEB_WORKER_H_
6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_WEB_WORKER_H_ 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_WEB_WORKER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel .h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel .h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorker.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorker.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h"
13 13
14 #ifndef WebTransferableReceipt_h
15 #ifndef STUB_WebTransferableReceipt_h
16 #define STUB_WebTransferableReceipt_h
17 namespace WebKit {
18 typedef WebMessagePortChannel WebTransferableReceipt;
19 typedef WebVector<WebTransferableReceipt*> WebTransferableReceiptArray;
20 } // namespace WebKit
21 #endif // STUB_WebTransferableReceipt_h
22 #endif // WebTransferableReceipt_h
23
14 namespace WebKit { 24 namespace WebKit {
15 class WebApplicationCacheHost; 25 class WebApplicationCacheHost;
16 class WebApplicationCacheHostClient; 26 class WebApplicationCacheHostClient;
17 class WebFrame; 27 class WebFrame;
18 class WebNotificationPresenter; 28 class WebNotificationPresenter;
19 class WebString; 29 class WebString;
20 class WebURL; 30 class WebURL;
21 } 31 }
22 32
23 // WebWorkers are not functional in test_shell. This class effectively 33 // WebWorkers are not functional in test_shell. This class effectively
24 // stubs things out. 34 // stubs things out.
25 class TestWebWorker : public WebKit::WebWorker, 35 class TestWebWorker : public WebKit::WebWorker,
26 public WebKit::WebWorkerClient, 36 public WebKit::WebWorkerClient,
27 public base::RefCounted<TestWebWorker> { 37 public base::RefCounted<TestWebWorker> {
28 public: 38 public:
29 TestWebWorker(); 39 TestWebWorker();
30 40
31 // WebWorker methods: 41 // WebWorker methods:
32 virtual void startWorkerContext(const WebKit::WebURL& script_url, 42 virtual void startWorkerContext(const WebKit::WebURL& script_url,
33 const WebKit::WebString& user_agent, 43 const WebKit::WebString& user_agent,
34 const WebKit::WebString& source_code) { 44 const WebKit::WebString& source_code) {
35 } 45 }
36 virtual void terminateWorkerContext() { 46 virtual void terminateWorkerContext() {
37 } 47 }
38 virtual void postMessageToWorkerContext( 48 virtual void postMessageToWorkerContext(
39 const WebKit::WebString& message, 49 const WebKit::WebString& message,
40 const WebKit::WebMessagePortChannelArray& channel) { 50 const WebKit::WebTransferableReceiptArray& receipts) {
41 } 51 }
42 virtual void workerObjectDestroyed(); 52 virtual void workerObjectDestroyed();
43 virtual void clientDestroyed() { 53 virtual void clientDestroyed() {
44 } 54 }
45 55
46 // WebWorkerClient methods: 56 // WebWorkerClient methods:
47 virtual void postMessageToWorkerObject( 57 virtual void postMessageToWorkerObject(
48 const WebKit::WebString& message, 58 const WebKit::WebString& message,
49 const WebKit::WebMessagePortChannelArray& channel) { 59 const WebKit::WebTransferableReceiptArray& receipts) {
50 } 60 }
51 virtual void postExceptionToWorkerObject( 61 virtual void postExceptionToWorkerObject(
52 const WebKit::WebString& error_message, 62 const WebKit::WebString& error_message,
53 int line_number, 63 int line_number,
54 const WebKit::WebString& source_url) { 64 const WebKit::WebString& source_url) {
55 } 65 }
56 virtual void postConsoleMessageToWorkerObject( 66 virtual void postConsoleMessageToWorkerObject(
57 int destination_id, 67 int destination_id,
58 int source_id, 68 int source_id,
59 int message_type, 69 int message_type,
(...skipping 17 matching lines...) Expand all
77 87
78 private: 88 private:
79 friend class base::RefCounted<TestWebWorker>; 89 friend class base::RefCounted<TestWebWorker>;
80 90
81 virtual ~TestWebWorker(); 91 virtual ~TestWebWorker();
82 92
83 DISALLOW_COPY_AND_ASSIGN(TestWebWorker); 93 DISALLOW_COPY_AND_ASSIGN(TestWebWorker);
84 }; 94 };
85 95
86 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEB_WORKER_H_ 96 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_WEB_WORKER_H_
OLDNEW
« no previous file with comments | « content/worker/webworkerclient_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698