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

Side by Side Diff: content/common/thread_safe_sender.h

Issue 16328003: Move a bunch of child-only code from content/common to content/child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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 | « content/common/socket_stream_dispatcher.cc ('k') | content/common/thread_safe_sender.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) 2013 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_COMMON_THREAD_SAFE_SENDER_H_
6 #define CONTENT_COMMON_THREAD_SAFE_SENDER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "ipc/ipc_sender.h"
10
11 namespace base {
12 class MessageLoopProxy;
13 }
14
15 namespace IPC {
16 class SyncMessageFilter;
17 }
18
19 namespace content {
20 class ChildThread;
21
22 // The class of Sender returned by ChildThread::thread_safe_sender().
23 class ThreadSafeSender
24 : public IPC::Sender,
25 public base::RefCountedThreadSafe<ThreadSafeSender> {
26 public:
27 virtual bool Send(IPC::Message* msg) OVERRIDE;
28
29 private:
30 friend class ChildThread; // for construction
31 friend class base::RefCountedThreadSafe<ThreadSafeSender>;
32
33 ThreadSafeSender(base::MessageLoopProxy* main_loop,
34 IPC::SyncMessageFilter* sync_filter);
35 virtual ~ThreadSafeSender();
36
37 scoped_refptr<base::MessageLoopProxy> main_loop_;
38 scoped_refptr<IPC::SyncMessageFilter> sync_filter_;
39
40 DISALLOW_COPY_AND_ASSIGN(ThreadSafeSender);
41 };
42
43 } // namespace content
44
45 #endif // CONTENT_COMMON_THREAD_SAFE_SENDER_H_
OLDNEW
« no previous file with comments | « content/common/socket_stream_dispatcher.cc ('k') | content/common/thread_safe_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698