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

Side by Side Diff: chrome/worker/webworker_stub_base.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/webworker_stub.cc ('k') | chrome/worker/webworker_stub_base.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_WEBWORKER_STUB_BASE_H_ 5 #ifndef CHROME_WORKER_WEBWORKER_STUB_BASE_H_
6 #define CHROME_WORKER_WEBWORKER_STUB_BASE_H_ 6 #define CHROME_WORKER_WEBWORKER_STUB_BASE_H_
7 7
8 #include "chrome/worker/webworkerclient_proxy.h" 8 #include "chrome/worker/webworkerclient_proxy.h"
9 #include "chrome/worker/worker_webapplicationcachehost_impl.h"
9 #include "ipc/ipc_channel.h" 10 #include "ipc/ipc_channel.h"
10 11
11 // This class is the common base class for both WebWorkerStub and 12 // This class is the common base class for both WebWorkerStub and
12 // WebSharedWorkerStub and contains common setup/teardown functionality. 13 // WebSharedWorkerStub and contains common setup/teardown functionality.
13 class WebWorkerStubBase : public IPC::Channel::Listener { 14 class WebWorkerStubBase : public IPC::Channel::Listener {
14 public: 15 public:
15 explicit WebWorkerStubBase(int route_id); 16 WebWorkerStubBase(int route_id,
17 const WorkerAppCacheInitInfo& appcache_init_info);
16 virtual ~WebWorkerStubBase(); 18 virtual ~WebWorkerStubBase();
17 19
18 // Invoked when the WebWorkerClientProxy is shutting down. 20 // Invoked when the WebWorkerClientProxy is shutting down.
19 void Shutdown(); 21 void Shutdown();
20 22
21 // Called after terminating the worker context to make sure that the worker 23 // Called after terminating the worker context to make sure that the worker
22 // actually terminates (is not stuck in an infinite loop). 24 // actually terminates (is not stuck in an infinite loop).
23 void EnsureWorkerContextTerminates(); 25 void EnsureWorkerContextTerminates();
24 26
25 WebWorkerClientProxy* client() { return &client_; } 27 WebWorkerClientProxy* client() { return &client_; }
26 28
29 const WorkerAppCacheInitInfo& appcache_init_info() const {
30 return appcache_init_info_;
31 }
27 private: 32 private:
28 int route_id_; 33 int route_id_;
34 WorkerAppCacheInitInfo appcache_init_info_;
29 35
30 // WebWorkerClient that responds to outgoing API calls from the worker object. 36 // WebWorkerClient that responds to outgoing API calls from the worker object.
31 WebWorkerClientProxy client_; 37 WebWorkerClientProxy client_;
32 38
33 DISALLOW_COPY_AND_ASSIGN(WebWorkerStubBase); 39 DISALLOW_COPY_AND_ASSIGN(WebWorkerStubBase);
34 }; 40 };
35 41
36 #endif // CHROME_WORKER_WEBWORKER_STUB_BASE_H_ 42 #endif // CHROME_WORKER_WEBWORKER_STUB_BASE_H_
OLDNEW
« no previous file with comments | « chrome/worker/webworker_stub.cc ('k') | chrome/worker/webworker_stub_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698