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

Side by Side Diff: mojo/shell/app_child_process_host.cc

Issue 289063015: Mojo: Remove SetClient from generated interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
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 "mojo/shell/app_child_process_host.h" 5 #include "mojo/shell/app_child_process_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/embedder/embedder.h" 9 #include "mojo/embedder/embedder.h"
10 #include "mojo/public/cpp/system/core.h" 10 #include "mojo/public/cpp/system/core.h"
(...skipping 18 matching lines...) Expand all
29 DCHECK(platform_channel()->is_valid()); 29 DCHECK(platform_channel()->is_valid());
30 30
31 mojo::ScopedMessagePipeHandle handle(embedder::CreateChannel( 31 mojo::ScopedMessagePipeHandle handle(embedder::CreateChannel(
32 platform_channel()->Pass(), 32 platform_channel()->Pass(),
33 context()->task_runners()->io_runner(), 33 context()->task_runners()->io_runner(),
34 base::Bind(&AppChildProcessHost::DidCreateChannel, 34 base::Bind(&AppChildProcessHost::DidCreateChannel,
35 base::Unretained(this)), 35 base::Unretained(this)),
36 base::MessageLoop::current()->message_loop_proxy())); 36 base::MessageLoop::current()->message_loop_proxy()));
37 37
38 controller_.Bind(handle.Pass()); 38 controller_.Bind(handle.Pass());
39 controller_->SetClient(controller_client_); 39 controller_.set_client(controller_client_);
40 } 40 }
41 41
42 void AppChildProcessHost::DidStart(bool success) { 42 void AppChildProcessHost::DidStart(bool success) {
43 DVLOG(2) << "AppChildProcessHost::DidStart()"; 43 DVLOG(2) << "AppChildProcessHost::DidStart()";
44 44
45 if (!success) { 45 if (!success) {
46 LOG(ERROR) << "Failed to start app child process"; 46 LOG(ERROR) << "Failed to start app child process";
47 controller_client_->AppCompleted(MOJO_RESULT_UNKNOWN); 47 controller_client_->AppCompleted(MOJO_RESULT_UNKNOWN);
48 return; 48 return;
49 } 49 }
50 } 50 }
51 51
52 // Callback for |embedder::CreateChannel()|. 52 // Callback for |embedder::CreateChannel()|.
53 void AppChildProcessHost::DidCreateChannel( 53 void AppChildProcessHost::DidCreateChannel(
54 embedder::ChannelInfo* channel_info) { 54 embedder::ChannelInfo* channel_info) {
55 DVLOG(2) << "AppChildProcessHost::DidCreateChannel()"; 55 DVLOG(2) << "AppChildProcessHost::DidCreateChannel()";
56 56
57 CHECK(channel_info); 57 CHECK(channel_info);
58 channel_info_ = channel_info; 58 channel_info_ = channel_info;
59 } 59 }
60 60
61 } // namespace shell 61 } // namespace shell
62 } // namespace mojo 62 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/view_manager_connection_unittest.cc ('k') | mojo/shell/shell_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698