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

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

Issue 1719193003: Add a user id parameter to connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 months 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/wm/window_manager_application.h » ('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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « mash/task_viewer/task_viewer.h ('k') | mash/wm/window_manager_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698