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

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

Issue 2852183002: Delete the tracing service (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') | services/file/BUILD.gn » ('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"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
15 #include "mash/public/interfaces/launchable.mojom.h" 15 #include "mash/public/interfaces/launchable.mojom.h"
16 #include "services/navigation/public/interfaces/view.mojom.h" 16 #include "services/navigation/public/interfaces/view.mojom.h"
17 #include "services/service_manager/public/c/main.h" 17 #include "services/service_manager/public/c/main.h"
18 #include "services/service_manager/public/cpp/connector.h" 18 #include "services/service_manager/public/cpp/connector.h"
19 #include "services/service_manager/public/cpp/service.h" 19 #include "services/service_manager/public/cpp/service.h"
20 #include "services/service_manager/public/cpp/service_context.h" 20 #include "services/service_manager/public/cpp/service_context.h"
21 #include "services/service_manager/public/cpp/service_runner.h" 21 #include "services/service_manager/public/cpp/service_runner.h"
22 #include "services/tracing/public/cpp/provider.h"
23 #include "ui/aura/mus/window_port_mus.h" 22 #include "ui/aura/mus/window_port_mus.h"
24 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
25 #include "ui/gfx/canvas.h" 24 #include "ui/gfx/canvas.h"
26 #include "ui/gfx/paint_throbber.h" 25 #include "ui/gfx/paint_throbber.h"
27 #include "ui/native_theme/native_theme.h" 26 #include "ui/native_theme/native_theme.h"
28 #include "ui/views/background.h" 27 #include "ui/views/background.h"
29 #include "ui/views/controls/button/label_button.h" 28 #include "ui/views/controls/button/label_button.h"
30 #include "ui/views/controls/textfield/textfield.h" 29 #include "ui/views/controls/textfield/textfield.h"
31 #include "ui/views/controls/textfield/textfield_controller.h" 30 #include "ui/views/controls/textfield/textfield_controller.h"
32 #include "ui/views/mus/aura_init.h" 31 #include "ui/views/mus/aura_init.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 161
163 void Webtest::RemoveWindow(views::Widget* window) { 162 void Webtest::RemoveWindow(views::Widget* window) {
164 auto it = std::find(windows_.begin(), windows_.end(), window); 163 auto it = std::find(windows_.begin(), windows_.end(), window);
165 DCHECK(it != windows_.end()); 164 DCHECK(it != windows_.end());
166 windows_.erase(it); 165 windows_.erase(it);
167 if (windows_.empty()) 166 if (windows_.empty())
168 base::MessageLoop::current()->QuitWhenIdle(); 167 base::MessageLoop::current()->QuitWhenIdle();
169 } 168 }
170 169
171 void Webtest::OnStart() { 170 void Webtest::OnStart() {
172 tracing_.Initialize(context()->connector(), context()->identity().name());
173 aura_init_ = base::MakeUnique<views::AuraInit>( 171 aura_init_ = base::MakeUnique<views::AuraInit>(
174 context()->connector(), context()->identity(), "views_mus_resources.pak", 172 context()->connector(), context()->identity(), "views_mus_resources.pak",
175 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); 173 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
176 } 174 }
177 175
178 void Webtest::OnBindInterface(const service_manager::ServiceInfo& source_info, 176 void Webtest::OnBindInterface(const service_manager::ServiceInfo& source_info,
179 const std::string& interface_name, 177 const std::string& interface_name,
180 mojo::ScopedMessagePipeHandle interface_pipe) { 178 mojo::ScopedMessagePipeHandle interface_pipe) {
181 registry_.BindInterface(source_info.identity, interface_name, 179 registry_.BindInterface(source_info.identity, interface_name,
182 std::move(interface_pipe)); 180 std::move(interface_pipe));
(...skipping 21 matching lines...) Expand all
204 AddWindow(window); 202 AddWindow(window);
205 } 203 }
206 204
207 void Webtest::Create(const service_manager::Identity& remote_identity, 205 void Webtest::Create(const service_manager::Identity& remote_identity,
208 mojom::LaunchableRequest request) { 206 mojom::LaunchableRequest request) {
209 bindings_.AddBinding(this, std::move(request)); 207 bindings_.AddBinding(this, std::move(request));
210 } 208 }
211 209
212 } // namespace webtest 210 } // namespace webtest
213 } // namespace mash 211 } // namespace mash
OLDNEW
« no previous file with comments | « mash/webtest/webtest.h ('k') | services/file/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698