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

Side by Side Diff: ipc/ipc_channel_common.cc

Issue 310293002: Make IPC::Channel polymorphic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt to fix build breakage Created 6 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 | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_nacl.h » ('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 #include "ipc/ipc_channel.h" 5 #include "ipc/ipc_channel.h"
6 6
7 namespace IPC { 7 namespace IPC {
8 8
9 // static 9 // static
10 scoped_ptr<Channel> Channel::CreateByModeForProxy(
11 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) {
12 return make_scoped_ptr(
13 new Channel(channel_handle, mode, listener));
14 }
15
16 // static
17 scoped_ptr<Channel> Channel::CreateClient( 10 scoped_ptr<Channel> Channel::CreateClient(
18 const IPC::ChannelHandle &channel_handle, Listener* listener) { 11 const IPC::ChannelHandle &channel_handle, Listener* listener) {
19 return make_scoped_ptr( 12 return Channel::Create(channel_handle, Channel::MODE_CLIENT, listener);
20 new Channel(channel_handle, Channel::MODE_CLIENT, listener));
21 } 13 }
22 14
23 // static 15 // static
24 scoped_ptr<Channel> Channel::CreateNamedServer( 16 scoped_ptr<Channel> Channel::CreateNamedServer(
25 const IPC::ChannelHandle &channel_handle, Listener* listener) { 17 const IPC::ChannelHandle &channel_handle, Listener* listener) {
26 return make_scoped_ptr( 18 return Channel::Create(channel_handle, Channel::MODE_NAMED_SERVER, listener);
27 new Channel(channel_handle, Channel::MODE_NAMED_SERVER, listener));
28 } 19 }
29 20
30 // static 21 // static
31 scoped_ptr<Channel> Channel::CreateNamedClient( 22 scoped_ptr<Channel> Channel::CreateNamedClient(
32 const IPC::ChannelHandle &channel_handle, Listener* listener) { 23 const IPC::ChannelHandle &channel_handle, Listener* listener) {
33 return make_scoped_ptr( 24 return Channel::Create(channel_handle, Channel::MODE_NAMED_CLIENT, listener);
34 new Channel(channel_handle, Channel::MODE_NAMED_CLIENT, listener));
35 } 25 }
36 26
37 #if defined(OS_POSIX) 27 #if defined(OS_POSIX)
38 // static 28 // static
39 scoped_ptr<Channel> Channel::CreateOpenNamedServer( 29 scoped_ptr<Channel> Channel::CreateOpenNamedServer(
40 const IPC::ChannelHandle &channel_handle, Listener* listener) { 30 const IPC::ChannelHandle &channel_handle, Listener* listener) {
41 return make_scoped_ptr( 31 return Channel::Create(channel_handle,
42 new Channel(channel_handle, Channel::MODE_OPEN_NAMED_SERVER, listener)); 32 Channel::MODE_OPEN_NAMED_SERVER,
33 listener);
43 } 34 }
44 #endif 35 #endif
45 36
46 // static 37 // static
47 scoped_ptr<Channel> Channel::CreateServer( 38 scoped_ptr<Channel> Channel::CreateServer(
48 const IPC::ChannelHandle &channel_handle, Listener* listener) { 39 const IPC::ChannelHandle &channel_handle, Listener* listener) {
49 return make_scoped_ptr( 40 return Channel::Create(channel_handle, Channel::MODE_SERVER, listener);
50 new Channel(channel_handle, Channel::MODE_SERVER, listener));
51 } 41 }
52 42
43 Channel::~Channel() {
44 }
53 45
54 } // namespace IPC 46 } // namespace IPC
55 47
OLDNEW
« no previous file with comments | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_nacl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698