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

Side by Side Diff: content/worker/webworker_stub_base.h

Issue 8399007: Removing dedicated worker-related IPC codei (first round). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: CR feedback Created 9 years, 1 month 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
« no previous file with comments | « content/worker/webworker_stub.cc ('k') | content/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_WORKER_WEBWORKER_STUB_BASE_H_
6 #define CONTENT_WORKER_WEBWORKER_STUB_BASE_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "content/worker/webworkerclient_proxy.h"
11 #include "content/worker/worker_webapplicationcachehost_impl.h"
12 #include "ipc/ipc_channel.h"
13
14 // This class is the common base class for both WebWorkerStub and
15 // WebSharedWorkerStub and contains common setup/teardown functionality.
16 class WebWorkerStubBase : public IPC::Channel::Listener {
17 public:
18 WebWorkerStubBase(int route_id,
19 const WorkerAppCacheInitInfo& appcache_init_info);
20 virtual ~WebWorkerStubBase();
21
22 // Invoked when the WebWorkerClientProxy is shutting down.
23 void Shutdown();
24
25 // Called after terminating the worker context to make sure that the worker
26 // actually terminates (is not stuck in an infinite loop).
27 void EnsureWorkerContextTerminates();
28
29 WebWorkerClientProxy* client() { return &client_; }
30
31 const WorkerAppCacheInitInfo& appcache_init_info() const {
32 return appcache_init_info_;
33 }
34
35 // Returns the script url of this worker.
36 virtual const GURL& url() const = 0;
37
38 private:
39 int route_id_;
40 WorkerAppCacheInitInfo appcache_init_info_;
41
42 // WebWorkerClient that responds to outgoing API calls from the worker object.
43 WebWorkerClientProxy client_;
44
45 DISALLOW_COPY_AND_ASSIGN(WebWorkerStubBase);
46 };
47
48 #endif // CONTENT_WORKER_WEBWORKER_STUB_BASE_H_
OLDNEW
« no previous file with comments | « content/worker/webworker_stub.cc ('k') | content/worker/webworker_stub_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698