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

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

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 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/mojo_media_application.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/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 void Webtest::OnStart(const shell::Identity& identity) { 160 void Webtest::OnStart(const shell::Identity& identity) {
161 tracing_.Initialize(connector(), identity.name()); 161 tracing_.Initialize(connector(), identity.name());
162 162
163 aura_init_.reset( 163 aura_init_.reset(
164 new views::AuraInit(connector(), "views_mus_resources.pak")); 164 new views::AuraInit(connector(), "views_mus_resources.pak"));
165 window_manager_connection_ = 165 window_manager_connection_ =
166 views::WindowManagerConnection::Create(connector(), identity); 166 views::WindowManagerConnection::Create(connector(), identity);
167 } 167 }
168 168
169 bool Webtest::OnConnect(shell::Connection* connection) { 169 bool Webtest::OnConnect(const shell::Identity& remote_identity,
170 connection->AddInterface<mojom::Launchable>(this); 170 shell::InterfaceRegistry* registry) {
171 registry->AddInterface<mojom::Launchable>(this);
171 return true; 172 return true;
172 } 173 }
173 174
174 void Webtest::Launch(uint32_t what, mojom::LaunchMode how) { 175 void Webtest::Launch(uint32_t what, mojom::LaunchMode how) {
175 bool reuse = how == mojom::LaunchMode::REUSE || 176 bool reuse = how == mojom::LaunchMode::REUSE ||
176 how == mojom::LaunchMode::DEFAULT; 177 how == mojom::LaunchMode::DEFAULT;
177 if (reuse && !windows_.empty()) { 178 if (reuse && !windows_.empty()) {
178 windows_.back()->Activate(); 179 windows_.back()->Activate();
179 return; 180 return;
180 } 181 }
(...skipping 13 matching lines...) Expand all
194 AddWindow(window); 195 AddWindow(window);
195 } 196 }
196 197
197 void Webtest::Create(const shell::Identity& remote_identity, 198 void Webtest::Create(const shell::Identity& remote_identity,
198 mojom::LaunchableRequest request) { 199 mojom::LaunchableRequest request) {
199 bindings_.AddBinding(this, std::move(request)); 200 bindings_.AddBinding(this, std::move(request));
200 } 201 }
201 202
202 } // namespace webtest 203 } // namespace webtest
203 } // namespace mash 204 } // namespace mash
OLDNEW
« no previous file with comments | « mash/webtest/webtest.h ('k') | media/mojo/services/mojo_media_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698