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

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

Issue 6713005: Move a bunch of gpu/worker/plugin renderer code to content. I temporarily disabled the sad plugi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/renderer/webworker_base.cc ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_RENDERER_WEBWORKER_PROXY_H_
6 #define CHROME_RENDERER_WEBWORKER_PROXY_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "chrome/renderer/webworker_base.h"
13 #include "ipc/ipc_channel.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorker.h"
15
16 class ChildThread;
17 class GURL;
18 class RenderView;
19 struct WorkerHostMsg_PostConsoleMessageToWorkerObject_Params;
20
21 // This class provides an implementation of WebWorker that the renderer provides
22 // to the glue. This class converts function calls to IPC messages that are
23 // dispatched in the worker process by WebWorkerClientProxy. It also receives
24 // IPC messages from WebWorkerClientProxy which it converts to function calls to
25 // WebWorkerClient.
26 class WebWorkerProxy : public WebKit::WebWorker, private WebWorkerBase {
27 public:
28 WebWorkerProxy(WebKit::WebWorkerClient* client,
29 ChildThread* child_thread,
30 int render_view_route_id,
31 int parent_appcache_host_id);
32 ~WebWorkerProxy();
33
34 // WebWorker implementation.
35 virtual void startWorkerContext(const WebKit::WebURL& script_url,
36 const WebKit::WebString& user_agent,
37 const WebKit::WebString& source_code);
38 virtual void terminateWorkerContext();
39 virtual void postMessageToWorkerContext(
40 const WebKit::WebString& message,
41 const WebKit::WebMessagePortChannelArray& channel_array);
42 virtual void workerObjectDestroyed();
43 virtual void clientDestroyed();
44
45 // IPC::Channel::Listener implementation.
46 virtual bool OnMessageReceived(const IPC::Message& message);
47
48 private:
49 void CancelCreation();
50 void OnWorkerCreated();
51 void OnWorkerContextDestroyed();
52 void OnPostMessage(const string16& message,
53 const std::vector<int>& sent_message_port_ids,
54 const std::vector<int>& new_routing_ids);
55 void OnPostConsoleMessageToWorkerObject(
56 const WorkerHostMsg_PostConsoleMessageToWorkerObject_Params& params);
57
58
59 // Used to communicate to the WebCore::Worker object in response to IPC
60 // messages.
61 WebKit::WebWorkerClient* client_;
62
63 DISALLOW_COPY_AND_ASSIGN(WebWorkerProxy);
64 };
65
66 #endif // CHROME_RENDERER_WEBWORKER_PROXY_H_
OLDNEW
« no previous file with comments | « chrome/renderer/webworker_base.cc ('k') | chrome/renderer/webworker_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698