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

Side by Side Diff: trunk/src/apps/app_shim/app_shim_host_mac.cc

Issue 312553004: Revert 274310 "Introduce IPC::ChannelProxy::Create*() and IPC::S..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | « no previous file | trunk/src/apps/app_shim/app_shim_host_manager_browsertest_mac.mm » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/app_shim/app_shim_host_mac.h" 5 #include "apps/app_shim/app_shim_host_mac.h"
6 6
7 #include "apps/app_shim/app_shim_handler_mac.h" 7 #include "apps/app_shim/app_shim_handler_mac.h"
8 #include "apps/app_shim/app_shim_messages.h" 8 #include "apps/app_shim/app_shim_messages.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "ipc/ipc_channel_proxy.h" 13 #include "ipc/ipc_channel_proxy.h"
14 14
15 AppShimHost::AppShimHost() : initial_launch_finished_(false) {} 15 AppShimHost::AppShimHost() : initial_launch_finished_(false) {}
16 16
17 AppShimHost::~AppShimHost() { 17 AppShimHost::~AppShimHost() {
18 DCHECK(CalledOnValidThread()); 18 DCHECK(CalledOnValidThread());
19 apps::AppShimHandler* handler = apps::AppShimHandler::GetForAppMode(app_id_); 19 apps::AppShimHandler* handler = apps::AppShimHandler::GetForAppMode(app_id_);
20 if (handler) 20 if (handler)
21 handler->OnShimClose(this); 21 handler->OnShimClose(this);
22 } 22 }
23 23
24 void AppShimHost::ServeChannel(const IPC::ChannelHandle& handle) { 24 void AppShimHost::ServeChannel(const IPC::ChannelHandle& handle) {
25 DCHECK(CalledOnValidThread()); 25 DCHECK(CalledOnValidThread());
26 DCHECK(!channel_.get()); 26 DCHECK(!channel_.get());
27 channel_ = IPC::ChannelProxy::CreateServer( 27 channel_.reset(new IPC::ChannelProxy(
28 handle, 28 handle,
29 IPC::Channel::MODE_SERVER,
29 this, 30 this,
30 content::BrowserThread::GetMessageLoopProxyForThread( 31 content::BrowserThread::GetMessageLoopProxyForThread(
31 content::BrowserThread::IO).get()); 32 content::BrowserThread::IO).get()));
32 } 33 }
33 34
34 base::FilePath AppShimHost::GetProfilePath() const { 35 base::FilePath AppShimHost::GetProfilePath() const {
35 return profile_path_; 36 return profile_path_;
36 } 37 }
37 38
38 std::string AppShimHost::GetAppId() const { 39 std::string AppShimHost::GetAppId() const {
39 return app_id_; 40 return app_id_;
40 } 41 }
41 42
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 121 }
121 122
122 void AppShimHost::OnAppRequestUserAttention() { 123 void AppShimHost::OnAppRequestUserAttention() {
123 Send(new AppShimMsg_RequestUserAttention); 124 Send(new AppShimMsg_RequestUserAttention);
124 } 125 }
125 126
126 void AppShimHost::Close() { 127 void AppShimHost::Close() {
127 DCHECK(CalledOnValidThread()); 128 DCHECK(CalledOnValidThread());
128 delete this; 129 delete this;
129 } 130 }
OLDNEW
« no previous file with comments | « no previous file | trunk/src/apps/app_shim/app_shim_host_manager_browsertest_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698