OLD | NEW |
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 void TaskViewer::Launch(uint32_t what, mojom::LaunchMode how) { | 301 void TaskViewer::Launch(uint32_t what, mojom::LaunchMode how) { |
302 bool reuse = how == mojom::LaunchMode::REUSE || | 302 bool reuse = how == mojom::LaunchMode::REUSE || |
303 how == mojom::LaunchMode::DEFAULT; | 303 how == mojom::LaunchMode::DEFAULT; |
304 if (reuse && !windows_.empty()) { | 304 if (reuse && !windows_.empty()) { |
305 windows_.back()->Activate(); | 305 windows_.back()->Activate(); |
306 return; | 306 return; |
307 } | 307 } |
308 | 308 |
309 shell::mojom::ServiceManagerPtr service_manager; | 309 shell::mojom::ServiceManagerPtr service_manager; |
310 connector()->ConnectToInterface("mojo:shell", &service_manager); | 310 connector()->ConnectToInterface("service:shell", &service_manager); |
311 | 311 |
312 shell::mojom::ServiceManagerListenerPtr listener; | 312 shell::mojom::ServiceManagerListenerPtr listener; |
313 shell::mojom::ServiceManagerListenerRequest request = GetProxy(&listener); | 313 shell::mojom::ServiceManagerListenerRequest request = GetProxy(&listener); |
314 service_manager->AddListener(std::move(listener)); | 314 service_manager->AddListener(std::move(listener)); |
315 | 315 |
316 catalog::mojom::CatalogPtr catalog; | 316 catalog::mojom::CatalogPtr catalog; |
317 connector()->ConnectToInterface("mojo:catalog", &catalog); | 317 connector()->ConnectToInterface("service:catalog", &catalog); |
318 | 318 |
319 TaskViewerContents* task_viewer = new TaskViewerContents( | 319 TaskViewerContents* task_viewer = new TaskViewerContents( |
320 this, std::move(request), std::move(catalog)); | 320 this, std::move(request), std::move(catalog)); |
321 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( | 321 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( |
322 task_viewer, nullptr, gfx::Rect(10, 10, 500, 500)); | 322 task_viewer, nullptr, gfx::Rect(10, 10, 500, 500)); |
323 window->Show(); | 323 window->Show(); |
324 windows_.push_back(window); | 324 windows_.push_back(window); |
325 } | 325 } |
326 | 326 |
327 void TaskViewer::Create(const shell::Identity& remote_identity, | 327 void TaskViewer::Create(const shell::Identity& remote_identity, |
328 mojom::LaunchableRequest request) { | 328 mojom::LaunchableRequest request) { |
329 bindings_.AddBinding(this, std::move(request)); | 329 bindings_.AddBinding(this, std::move(request)); |
330 } | 330 } |
331 | 331 |
332 } // namespace task_viewer | 332 } // namespace task_viewer |
333 } // namespace main | 333 } // namespace main |
OLD | NEW |