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

Side by Side Diff: content/browser/shared_worker/shared_worker_host.h

Issue 2604733003: SharedWorker: Clean up SharedWorkerHost (Closed)
Patch Set: fix test crashes Created 3 years, 11 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
« no previous file with comments | « no previous file | content/browser/shared_worker/shared_worker_host.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_
6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ 6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 19 matching lines...) Expand all
30 // The SharedWorkerHost is the interface that represents the browser side of 30 // The SharedWorkerHost is the interface that represents the browser side of
31 // the browser <-> worker communication channel. 31 // the browser <-> worker communication channel.
32 class SharedWorkerHost { 32 class SharedWorkerHost {
33 public: 33 public:
34 SharedWorkerHost(SharedWorkerInstance* instance, 34 SharedWorkerHost(SharedWorkerInstance* instance,
35 SharedWorkerMessageFilter* filter, 35 SharedWorkerMessageFilter* filter,
36 int worker_route_id); 36 int worker_route_id);
37 ~SharedWorkerHost(); 37 ~SharedWorkerHost();
38 38
39 // Sends |message| to the SharedWorker. 39 // Sends |message| to the SharedWorker.
40 bool Send(IPC::Message* message); 40 bool Send(std::unique_ptr<IPC::Message> message);
kinuko 2016/12/27 15:38:29 This generally follows IPC::Sender pattern, it's f
nhiroki 2016/12/28 02:20:37 I reverted this change because I plan to mojofy sh
41 41
42 // Starts the SharedWorker in the renderer process which is associated with 42 // Starts the SharedWorker in the renderer process which is associated with
43 // |filter_|. 43 // |filter_|.
44 void Start(bool pause_on_start); 44 void Start(bool pause_on_start);
45 45
46 // Returns true iff the given message from a renderer process was forwarded to 46 // Returns true iff the given message from a renderer process was forwarded to
47 // the worker. 47 // the worker.
48 bool FilterMessage(const IPC::Message& message, 48 bool FilterMessage(const IPC::Message& message,
49 SharedWorkerMessageFilter* filter); 49 SharedWorkerMessageFilter* filter);
50 50
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 bool closed_; 134 bool closed_;
135 const base::TimeTicks creation_time_; 135 const base::TimeTicks creation_time_;
136 136
137 base::WeakPtrFactory<SharedWorkerHost> weak_factory_; 137 base::WeakPtrFactory<SharedWorkerHost> weak_factory_;
138 138
139 DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost); 139 DISALLOW_COPY_AND_ASSIGN(SharedWorkerHost);
140 }; 140 };
141 } // namespace content 141 } // namespace content
142 142
143 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_ 143 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/shared_worker/shared_worker_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698