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

Side by Side Diff: mash/webtest/webtest.cc

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « mash/webtest/webtest.h ('k') | media/mojo/services/media_service.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mash/webtest/webtest.h" 5 #include "mash/webtest/webtest.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 base::MessageLoop::current()->QuitWhenIdle(); 168 base::MessageLoop::current()->QuitWhenIdle();
169 } 169 }
170 170
171 void Webtest::OnStart() { 171 void Webtest::OnStart() {
172 tracing_.Initialize(context()->connector(), context()->identity().name()); 172 tracing_.Initialize(context()->connector(), context()->identity().name());
173 aura_init_ = base::MakeUnique<views::AuraInit>( 173 aura_init_ = base::MakeUnique<views::AuraInit>(
174 context()->connector(), context()->identity(), "views_mus_resources.pak", 174 context()->connector(), context()->identity(), "views_mus_resources.pak",
175 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); 175 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
176 } 176 }
177 177
178 void Webtest::OnBindInterface(const service_manager::ServiceInfo& source_info, 178 void Webtest::OnBindInterface(
179 const std::string& interface_name, 179 const service_manager::BindSourceInfo& source_info,
180 mojo::ScopedMessagePipeHandle interface_pipe) { 180 const std::string& interface_name,
181 mojo::ScopedMessagePipeHandle interface_pipe) {
181 registry_.BindInterface(source_info.identity, interface_name, 182 registry_.BindInterface(source_info.identity, interface_name,
182 std::move(interface_pipe)); 183 std::move(interface_pipe));
183 } 184 }
184 185
185 void Webtest::Launch(uint32_t what, mojom::LaunchMode how) { 186 void Webtest::Launch(uint32_t what, mojom::LaunchMode how) {
186 bool reuse = how == mojom::LaunchMode::REUSE || 187 bool reuse = how == mojom::LaunchMode::REUSE ||
187 how == mojom::LaunchMode::DEFAULT; 188 how == mojom::LaunchMode::DEFAULT;
188 if (reuse && !windows_.empty()) { 189 if (reuse && !windows_.empty()) {
189 windows_.back()->Activate(); 190 windows_.back()->Activate();
190 return; 191 return;
(...skipping 13 matching lines...) Expand all
204 AddWindow(window); 205 AddWindow(window);
205 } 206 }
206 207
207 void Webtest::Create(const service_manager::Identity& remote_identity, 208 void Webtest::Create(const service_manager::Identity& remote_identity,
208 mojom::LaunchableRequest request) { 209 mojom::LaunchableRequest request) {
209 bindings_.AddBinding(this, std::move(request)); 210 bindings_.AddBinding(this, std::move(request));
210 } 211 }
211 212
212 } // namespace webtest 213 } // namespace webtest
213 } // namespace mash 214 } // namespace mash
OLDNEW
« no previous file with comments | « mash/webtest/webtest.h ('k') | media/mojo/services/media_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698