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