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

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

Issue 2569413003: Converts more services to use aura-mus (Closed)
Patch Set: merge Created 4 years 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/task_viewer/task_viewer.h ('k') | mash/webtest/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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/task_viewer/task_viewer.h" 5 #include "mash/task_viewer/task_viewer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 13 matching lines...) Expand all
24 #include "services/service_manager/public/interfaces/constants.mojom.h" 24 #include "services/service_manager/public/interfaces/constants.mojom.h"
25 #include "services/service_manager/public/interfaces/service_manager.mojom.h" 25 #include "services/service_manager/public/interfaces/service_manager.mojom.h"
26 #include "ui/base/models/table_model.h" 26 #include "ui/base/models/table_model.h"
27 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
28 #include "ui/resources/grit/ui_resources.h" 28 #include "ui/resources/grit/ui_resources.h"
29 #include "ui/views/background.h" 29 #include "ui/views/background.h"
30 #include "ui/views/controls/button/md_text_button.h" 30 #include "ui/views/controls/button/md_text_button.h"
31 #include "ui/views/controls/table/table_view.h" 31 #include "ui/views/controls/table/table_view.h"
32 #include "ui/views/controls/table/table_view_observer.h" 32 #include "ui/views/controls/table/table_view_observer.h"
33 #include "ui/views/mus/aura_init.h" 33 #include "ui/views/mus/aura_init.h"
34 #include "ui/views/mus/window_manager_connection.h" 34 #include "ui/views/widget/widget.h"
35 #include "ui/views/widget/widget_delegate.h" 35 #include "ui/views/widget/widget_delegate.h"
36 36
37 namespace mash { 37 namespace mash {
38 namespace task_viewer { 38 namespace task_viewer {
39 namespace { 39 namespace {
40 40
41 using service_manager::mojom::RunningServiceInfoPtr; 41 using service_manager::mojom::RunningServiceInfoPtr;
42 42
43 class TaskViewerContents 43 class TaskViewerContents
44 : public views::WidgetDelegateView, 44 : public views::WidgetDelegateView,
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 DCHECK(it != windows_.end()); 288 DCHECK(it != windows_.end());
289 windows_.erase(it); 289 windows_.erase(it);
290 if (windows_.empty()) 290 if (windows_.empty())
291 base::MessageLoop::current()->QuitWhenIdle(); 291 base::MessageLoop::current()->QuitWhenIdle();
292 } 292 }
293 293
294 void TaskViewer::OnStart() { 294 void TaskViewer::OnStart() {
295 tracing_.Initialize(context()->connector(), context()->identity().name()); 295 tracing_.Initialize(context()->connector(), context()->identity().name());
296 296
297 aura_init_ = base::MakeUnique<views::AuraInit>( 297 aura_init_ = base::MakeUnique<views::AuraInit>(
298 context()->connector(), context()->identity(), "views_mus_resources.pak"); 298 context()->connector(), context()->identity(), "views_mus_resources.pak",
299 window_manager_connection_ = views::WindowManagerConnection::Create( 299 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
300 context()->connector(), context()->identity());
301 } 300 }
302 301
303 bool TaskViewer::OnConnect(const service_manager::ServiceInfo& remote_info, 302 bool TaskViewer::OnConnect(const service_manager::ServiceInfo& remote_info,
304 service_manager::InterfaceRegistry* registry) { 303 service_manager::InterfaceRegistry* registry) {
305 registry->AddInterface<::mash::mojom::Launchable>(this); 304 registry->AddInterface<::mash::mojom::Launchable>(this);
306 return true; 305 return true;
307 } 306 }
308 307
309 void TaskViewer::Launch(uint32_t what, mojom::LaunchMode how) { 308 void TaskViewer::Launch(uint32_t what, mojom::LaunchMode how) {
310 bool reuse = how == mojom::LaunchMode::REUSE || 309 bool reuse = how == mojom::LaunchMode::REUSE ||
(...skipping 24 matching lines...) Expand all
335 windows_.push_back(window); 334 windows_.push_back(window);
336 } 335 }
337 336
338 void TaskViewer::Create(const service_manager::Identity& remote_identity, 337 void TaskViewer::Create(const service_manager::Identity& remote_identity,
339 ::mash::mojom::LaunchableRequest request) { 338 ::mash::mojom::LaunchableRequest request) {
340 bindings_.AddBinding(this, std::move(request)); 339 bindings_.AddBinding(this, std::move(request));
341 } 340 }
342 341
343 } // namespace task_viewer 342 } // namespace task_viewer
344 } // namespace main 343 } // namespace main
OLDNEW
« no previous file with comments | « mash/task_viewer/task_viewer.h ('k') | mash/webtest/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698