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

Side by Side Diff: content/utility/utility_thread_impl.cc

Issue 2096643002: Eliminate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mah3
Patch Set: . Created 4 years, 5 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
« no previous file with comments | « content/utility/utility_process_control_impl.h ('k') | services/shell/public/cpp/connection.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/utility/utility_thread_impl.h" 5 #include "content/utility/utility_thread_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 blink_platform_impl_.reset(new UtilityBlinkPlatformImpl); 89 blink_platform_impl_.reset(new UtilityBlinkPlatformImpl);
90 blink::Platform::initialize(blink_platform_impl_.get()); 90 blink::Platform::initialize(blink_platform_impl_.get());
91 } 91 }
92 92
93 void UtilityThreadImpl::Init() { 93 void UtilityThreadImpl::Init() {
94 batch_mode_ = false; 94 batch_mode_ = false;
95 ChildProcess::current()->AddRefProcess(); 95 ChildProcess::current()->AddRefProcess();
96 GetContentClient()->utility()->UtilityThreadStarted(); 96 GetContentClient()->utility()->UtilityThreadStarted();
97 97
98 process_control_.reset(new UtilityProcessControlImpl); 98 process_control_.reset(new UtilityProcessControlImpl);
99 interface_registry()->AddInterface(base::Bind( 99 GetInterfaceRegistry()->AddInterface(base::Bind(
100 &UtilityThreadImpl::BindProcessControlRequest, base::Unretained(this))); 100 &UtilityThreadImpl::BindProcessControlRequest, base::Unretained(this)));
101 101
102 GetContentClient()->utility()->RegisterMojoInterfaces(interface_registry()); 102 GetContentClient()->utility()->RegisterMojoInterfaces(GetInterfaceRegistry());
103 } 103 }
104 104
105 bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { 105 bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
106 if (GetContentClient()->utility()->OnMessageReceived(msg)) 106 if (GetContentClient()->utility()->OnMessageReceived(msg))
107 return true; 107 return true;
108 108
109 bool handled = true; 109 bool handled = true;
110 IPC_BEGIN_MESSAGE_MAP(UtilityThreadImpl, msg) 110 IPC_BEGIN_MESSAGE_MAP(UtilityThreadImpl, msg)
111 IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Started, OnBatchModeStarted) 111 IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Started, OnBatchModeStarted)
112 IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Finished, OnBatchModeFinished) 112 IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Finished, OnBatchModeFinished)
(...skipping 12 matching lines...) Expand all
125 } 125 }
126 126
127 void UtilityThreadImpl::BindProcessControlRequest( 127 void UtilityThreadImpl::BindProcessControlRequest(
128 mojo::InterfaceRequest<mojom::ProcessControl> request) { 128 mojo::InterfaceRequest<mojom::ProcessControl> request) {
129 DCHECK(process_control_); 129 DCHECK(process_control_);
130 process_control_bindings_.AddBinding(process_control_.get(), 130 process_control_bindings_.AddBinding(process_control_.get(),
131 std::move(request)); 131 std::move(request));
132 } 132 }
133 133
134 } // namespace content 134 } // namespace content
OLDNEW
« no previous file with comments | « content/utility/utility_process_control_impl.h ('k') | services/shell/public/cpp/connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698