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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 DISALLOW_COPY_AND_ASSIGN(TaskViewerContents); | 253 DISALLOW_COPY_AND_ASSIGN(TaskViewerContents); |
254 }; | 254 }; |
255 | 255 |
256 } // namespace | 256 } // namespace |
257 | 257 |
258 TaskViewer::TaskViewer() {} | 258 TaskViewer::TaskViewer() {} |
259 TaskViewer::~TaskViewer() {} | 259 TaskViewer::~TaskViewer() {} |
260 | 260 |
261 void TaskViewer::Initialize(mojo::Connector* connector, | 261 void TaskViewer::Initialize(mojo::Connector* connector, |
262 const std::string& url, | 262 const std::string& url, |
263 uint32_t id, uint32_t user_id) { | 263 const std::string& user_id, |
| 264 uint32_t id) { |
264 tracing_.Initialize(connector, url); | 265 tracing_.Initialize(connector, url); |
265 | 266 |
266 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); | 267 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); |
267 views::WindowManagerConnection::Create(connector); | 268 views::WindowManagerConnection::Create(connector); |
268 | 269 |
269 mojo::shell::mojom::ShellPtr shell; | 270 mojo::shell::mojom::ShellPtr shell; |
270 connector->ConnectToInterface("mojo:shell", &shell); | 271 connector->ConnectToInterface("mojo:shell", &shell); |
271 | 272 |
272 mojo::shell::mojom::InstanceListenerPtr listener; | 273 mojo::shell::mojom::InstanceListenerPtr listener; |
273 mojo::shell::mojom::InstanceListenerRequest request = GetProxy(&listener); | 274 mojo::shell::mojom::InstanceListenerRequest request = GetProxy(&listener); |
274 shell->AddInstanceListener(std::move(listener)); | 275 shell->AddInstanceListener(std::move(listener)); |
275 | 276 |
276 package_manager::mojom::CatalogPtr catalog; | 277 package_manager::mojom::CatalogPtr catalog; |
277 connector->ConnectToInterface("mojo:package_manager", &catalog); | 278 connector->ConnectToInterface("mojo:package_manager", &catalog); |
278 | 279 |
279 TaskViewerContents* task_viewer = new TaskViewerContents( | 280 TaskViewerContents* task_viewer = new TaskViewerContents( |
280 std::move(request), std::move(catalog)); | 281 std::move(request), std::move(catalog)); |
281 views::Widget* window = views::Widget::CreateWindowWithBounds( | 282 views::Widget* window = views::Widget::CreateWindowWithBounds( |
282 task_viewer, gfx::Rect(10, 10, 500, 500)); | 283 task_viewer, gfx::Rect(10, 10, 500, 500)); |
283 window->Show(); | 284 window->Show(); |
284 } | 285 } |
285 | 286 |
286 } // namespace task_viewer | 287 } // namespace task_viewer |
287 } // namespace main | 288 } // namespace main |
OLD | NEW |