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_application_delegate.h" | 5 #include "mash/task_viewer/task_viewer_application_delegate.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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 void TaskViewerApplicationDelegate::Initialize(mojo::Shell* shell, | 238 void TaskViewerApplicationDelegate::Initialize(mojo::Shell* shell, |
239 const std::string& url, | 239 const std::string& url, |
240 uint32_t id) { | 240 uint32_t id) { |
241 tracing_.Initialize(shell, url); | 241 tracing_.Initialize(shell, url); |
242 | 242 |
243 aura_init_.reset(new views::AuraInit(shell, "views_mus_resources.pak")); | 243 aura_init_.reset(new views::AuraInit(shell, "views_mus_resources.pak")); |
244 views::WindowManagerConnection::Create(shell); | 244 views::WindowManagerConnection::Create(shell); |
245 | 245 |
246 mojo::shell::mojom::ApplicationManagerPtr application_manager; | 246 mojo::shell::mojom::ApplicationManagerPtr application_manager; |
247 shell->ConnectToService("mojo:shell", &application_manager); | 247 shell->ConnectToInterface("mojo:shell", &application_manager); |
248 | 248 |
249 mojo::shell::mojom::ApplicationManagerListenerPtr listener; | 249 mojo::shell::mojom::ApplicationManagerListenerPtr listener; |
250 ListenerRequest request = GetProxy(&listener); | 250 ListenerRequest request = GetProxy(&listener); |
251 application_manager->AddListener(std::move(listener)); | 251 application_manager->AddListener(std::move(listener)); |
252 | 252 |
253 TaskViewer* task_viewer = new TaskViewer( | 253 TaskViewer* task_viewer = new TaskViewer( |
254 std::move(request), shell->CreateAppRefCount()); | 254 std::move(request), shell->CreateAppRefCount()); |
255 views::Widget* window = views::Widget::CreateWindowWithBounds( | 255 views::Widget* window = views::Widget::CreateWindowWithBounds( |
256 task_viewer, gfx::Rect(10, 10, 500, 500)); | 256 task_viewer, gfx::Rect(10, 10, 500, 500)); |
257 window->Show(); | 257 window->Show(); |
258 } | 258 } |
259 | 259 |
260 } // namespace task_viewer | 260 } // namespace task_viewer |
261 } // namespace main | 261 } // namespace main |
OLD | NEW |