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

Side by Side Diff: chrome/renderer/webworker_proxy.h

Issue 173193: Updating Worker.postMessage(), DOMWindow.postMessage(), and... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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 | « chrome/common/worker_messages_internal.h ('k') | chrome/renderer/webworker_proxy.cc » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_RENDERER_WEBWORKER_PROXY_H_ 5 #ifndef CHROME_RENDERER_WEBWORKER_PROXY_H_
6 #define CHROME_RENDERER_WEBWORKER_PROXY_H_ 6 #define CHROME_RENDERER_WEBWORKER_PROXY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 18 matching lines...) Expand all
29 int render_view_route_id); 29 int render_view_route_id);
30 virtual ~WebWorkerProxy(); 30 virtual ~WebWorkerProxy();
31 31
32 // WebWorker implementation. 32 // WebWorker implementation.
33 virtual void startWorkerContext(const WebKit::WebURL& script_url, 33 virtual void startWorkerContext(const WebKit::WebURL& script_url,
34 const WebKit::WebString& user_agent, 34 const WebKit::WebString& user_agent,
35 const WebKit::WebString& source_code); 35 const WebKit::WebString& source_code);
36 virtual void terminateWorkerContext(); 36 virtual void terminateWorkerContext();
37 virtual void postMessageToWorkerContext( 37 virtual void postMessageToWorkerContext(
38 const WebKit::WebString& message, 38 const WebKit::WebString& message,
39 WebKit::WebMessagePortChannel* channel); 39 const WebKit::WebMessagePortChannelArray& channel_array);
40 virtual void workerObjectDestroyed(); 40 virtual void workerObjectDestroyed();
41 41
42 // IPC::Channel::Listener implementation. 42 // IPC::Channel::Listener implementation.
43 void OnMessageReceived(const IPC::Message& message); 43 void OnMessageReceived(const IPC::Message& message);
44 44
45 private: 45 private:
46 bool Send(IPC::Message* message); 46 bool Send(IPC::Message* message);
47 47
48 void OnDedicatedWorkerCreated(); 48 void OnDedicatedWorkerCreated();
49 void OnPostMessage(const string16& message, 49 void OnPostMessage(const string16& message,
50 int sent_message_port_id, 50 const std::vector<int>& sent_message_port_ids,
51 int new_routing_id); 51 const std::vector<int>& new_routing_ids);
52 void OnPostConsoleMessageToWorkerObject( 52 void OnPostConsoleMessageToWorkerObject(
53 const WorkerHostMsg_PostConsoleMessageToWorkerObject_Params& params); 53 const WorkerHostMsg_PostConsoleMessageToWorkerObject_Params& params);
54 54
55 void Disconnect(); 55 void Disconnect();
56 56
57 // The routing id used to reach WebWorkerClientProxy in the worker process. 57 // The routing id used to reach WebWorkerClientProxy in the worker process.
58 int route_id_; 58 int route_id_;
59 59
60 ChildThread* child_thread_; 60 ChildThread* child_thread_;
61 61
62 // The routing id for the RenderView that created this worker. 62 // The routing id for the RenderView that created this worker.
63 int render_view_route_id_; 63 int render_view_route_id_;
64 64
65 // Used to communicate to the WebCore::Worker object in response to IPC 65 // Used to communicate to the WebCore::Worker object in response to IPC
66 // messages. 66 // messages.
67 WebKit::WebWorkerClient* client_; 67 WebKit::WebWorkerClient* client_;
68 68
69 // Stores messages that were sent before the StartWorkerContext message. 69 // Stores messages that were sent before the StartWorkerContext message.
70 std::vector<IPC::Message*> queued_messages_; 70 std::vector<IPC::Message*> queued_messages_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(WebWorkerProxy); 72 DISALLOW_COPY_AND_ASSIGN(WebWorkerProxy);
73 }; 73 };
74 74
75 #endif // CHROME_RENDERER_WEBWORKER_PROXY_H_ 75 #endif // CHROME_RENDERER_WEBWORKER_PROXY_H_
OLDNEW
« no previous file with comments | « chrome/common/worker_messages_internal.h ('k') | chrome/renderer/webworker_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698