diff options
author | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-05 16:15:38 +0000 |
---|---|---|
committer | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-05 16:15:38 +0000 |
commit | fca876a107b04f46eabeff93dbd09e3612d96c61 (patch) | |
tree | 5f851173c0418a9653f43d72618a34aba9cd01f4 /win8 | |
parent | 3408115e2fd1fcfb264d8a47498c9cc376e977c1 (diff) | |
download | chromium_src-fca876a107b04f46eabeff93dbd09e3612d96c61.zip chromium_src-fca876a107b04f46eabeff93dbd09e3612d96c61.tar.gz chromium_src-fca876a107b04f46eabeff93dbd09e3612d96c61.tar.bz2 |
Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create()
This change replaces constructors with Create() methods of
ChannelProxy and SyncChannel. This open the possibility to introduce
polymorphism to these classes.
This is a revision of r274310 (https://codereview.chromium.org/301973003/)
in which I added bunch of Create*() method variants.
The chagne was reverted. This change no longer does it and just keeps
using Channel::Mode to specify the channel type.
TEST=none
BUG=377980
R=darin@chromium.org,jam@chromium.org
Review URL: https://codereview.chromium.org/310853003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275140 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8')
-rw-r--r-- | win8/metro_driver/chrome_app_view_ash.cc | 11 | ||||
-rw-r--r-- | win8/viewer/metro_viewer_process_host.cc | 9 |
2 files changed, 10 insertions, 10 deletions
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc index c104a15..fd19385 100644 --- a/win8/metro_driver/chrome_app_view_ash.cc +++ b/win8/metro_driver/chrome_app_view_ash.cc @@ -694,11 +694,12 @@ ChromeAppViewAsh::Run() { // In Aura mode we create an IPC channel to the browser, then ask it to // connect to us. ChromeChannelListener ui_channel_listener(&ui_loop_, this); - IPC::ChannelProxy ui_channel(win8::kMetroViewerIPCChannelName, - IPC::Channel::MODE_NAMED_CLIENT, - &ui_channel_listener, - io_thread.message_loop_proxy()); - ui_channel_ = &ui_channel; + scoped_ptr<IPC::ChannelProxy> channel = + IPC::ChannelProxy::Create(win8::kMetroViewerIPCChannelName, + IPC::Channel::MODE_NAMED_CLIENT, + &ui_channel_listener, + io_thread.message_loop_proxy()); + ui_channel_ = channel.get(); // Upon receipt of the MetroViewerHostMsg_SetTargetSurface message the // browser will use D3D from the browser process to present to our Window. diff --git a/win8/viewer/metro_viewer_process_host.cc b/win8/viewer/metro_viewer_process_host.cc index 70b6b35..dde741b 100644 --- a/win8/viewer/metro_viewer_process_host.cc +++ b/win8/viewer/metro_viewer_process_host.cc @@ -51,11 +51,10 @@ MetroViewerProcessHost::MetroViewerProcessHost( DCHECK(!instance_); instance_ = this; - channel_.reset(new IPC::ChannelProxy( - kMetroViewerIPCChannelName, - IPC::Channel::MODE_NAMED_SERVER, - this, - ipc_task_runner)); + channel_ = IPC::ChannelProxy::Create(kMetroViewerIPCChannelName, + IPC::Channel::MODE_NAMED_SERVER, + this, + ipc_task_runner); } MetroViewerProcessHost::~MetroViewerProcessHost() { |