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

Side by Side Diff: chrome/worker/websharedworker_stub.h

Issue 1719007: Initializing an appcache host in a worker process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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/worker/DEPS ('k') | chrome/worker/websharedworker_stub.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_WORKER_WEBSHAREDWORKER_STUB_H_ 5 #ifndef CHROME_WORKER_WEBSHAREDWORKER_STUB_H_
6 #define CHROME_WORKER_WEBSHAREDWORKER_STUB_H_ 6 #define CHROME_WORKER_WEBSHAREDWORKER_STUB_H_
7 7
8 #include "chrome/worker/webworker_stub_base.h" 8 #include "chrome/worker/webworker_stub_base.h"
9 #include "chrome/worker/webworkerclient_proxy.h" 9 #include "chrome/worker/webworkerclient_proxy.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 11
12 namespace WebKit { 12 namespace WebKit {
13 class WebSharedWorker; 13 class WebSharedWorker;
14 } 14 }
15 15
16 // This class creates a WebSharedWorker, and translates incoming IPCs to the 16 // This class creates a WebSharedWorker, and translates incoming IPCs to the
17 // appropriate WebSharedWorker APIs. 17 // appropriate WebSharedWorker APIs.
18 class WebSharedWorkerStub : public WebWorkerStubBase { 18 class WebSharedWorkerStub : public WebWorkerStubBase {
19 public: 19 public:
20 WebSharedWorkerStub(const string16& name, int route_id); 20 WebSharedWorkerStub(const string16& name, int route_id,
21 const WorkerAppCacheInitInfo& appcache_init_info);
21 22
22 // IPC::Channel::Listener implementation. 23 // IPC::Channel::Listener implementation.
23 virtual void OnMessageReceived(const IPC::Message& message); 24 virtual void OnMessageReceived(const IPC::Message& message);
24 virtual void OnChannelError(); 25 virtual void OnChannelError();
25 26
26 private: 27 private:
27 virtual ~WebSharedWorkerStub(); 28 virtual ~WebSharedWorkerStub();
28 29
29 // Invoked when the WebWorkerClientProxy is shutting down. 30 // Invoked when the WebWorkerClientProxy is shutting down.
30 void OnConnect(int sent_message_port_id, int routing_id); 31 void OnConnect(int sent_message_port_id, int routing_id);
31 void OnStartWorkerContext( 32 void OnStartWorkerContext(
32 const GURL& url, const string16& user_agent, const string16& source_code); 33 const GURL& url, const string16& user_agent, const string16& source_code);
33 void OnTerminateWorkerContext(); 34 void OnTerminateWorkerContext();
34 35
35 WebKit::WebSharedWorker* impl_; 36 WebKit::WebSharedWorker* impl_;
36 string16 name_; 37 string16 name_;
37 bool started_; 38 bool started_;
38 39
39 typedef std::pair<int, int> PendingConnectInfo; 40 typedef std::pair<int, int> PendingConnectInfo;
40 typedef std::vector<PendingConnectInfo> PendingConnectInfoList; 41 typedef std::vector<PendingConnectInfo> PendingConnectInfoList;
41 PendingConnectInfoList pending_connects_; 42 PendingConnectInfoList pending_connects_;
42 43
43 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub); 44 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub);
44 }; 45 };
45 46
46 #endif // CHROME_WORKER_WEBSHAREDWORKER_STUB_H_ 47 #endif // CHROME_WORKER_WEBSHAREDWORKER_STUB_H_
OLDNEW
« no previous file with comments | « chrome/worker/DEPS ('k') | chrome/worker/websharedworker_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698