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

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

Issue 1764253002: Rename shell.mojom to connector.mojom, ApplicationManager to Shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@32exe
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 | « content/test/data/web_ui_mojo_shell_test.js ('k') | mojo/mojo_base.gyp » ('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"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/process/process.h" 13 #include "base/process/process.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "mojo/public/cpp/bindings/binding.h" 16 #include "mojo/public/cpp/bindings/binding.h"
17 #include "mojo/services/package_manager/public/interfaces/catalog.mojom.h" 17 #include "mojo/services/package_manager/public/interfaces/catalog.mojom.h"
18 #include "mojo/shell/public/cpp/connection.h" 18 #include "mojo/shell/public/cpp/connection.h"
19 #include "mojo/shell/public/cpp/connector.h" 19 #include "mojo/shell/public/cpp/connector.h"
20 #include "mojo/shell/public/interfaces/application_manager.mojom.h" 20 #include "mojo/shell/public/interfaces/shell.mojom.h"
21 #include "ui/base/models/table_model.h" 21 #include "ui/base/models/table_model.h"
22 #include "ui/views/background.h" 22 #include "ui/views/background.h"
23 #include "ui/views/controls/button/label_button.h" 23 #include "ui/views/controls/button/label_button.h"
24 #include "ui/views/controls/table/table_view.h" 24 #include "ui/views/controls/table/table_view.h"
25 #include "ui/views/controls/table/table_view_observer.h" 25 #include "ui/views/controls/table/table_view_observer.h"
26 #include "ui/views/mus/aura_init.h" 26 #include "ui/views/mus/aura_init.h"
27 #include "ui/views/mus/window_manager_connection.h" 27 #include "ui/views/mus/window_manager_connection.h"
28 #include "ui/views/widget/widget_delegate.h" 28 #include "ui/views/widget/widget_delegate.h"
29 29
30 namespace mash { 30 namespace mash {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 uint32_t id, uint32_t user_id) {
264 tracing_.Initialize(connector, url); 264 tracing_.Initialize(connector, url);
265 265
266 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 266 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
267 views::WindowManagerConnection::Create(connector); 267 views::WindowManagerConnection::Create(connector);
268 268
269 mojo::shell::mojom::ApplicationManagerPtr application_manager; 269 mojo::shell::mojom::ShellPtr shell;
270 connector->ConnectToInterface("mojo:shell", &application_manager); 270 connector->ConnectToInterface("mojo:shell", &shell);
271 271
272 mojo::shell::mojom::InstanceListenerPtr listener; 272 mojo::shell::mojom::InstanceListenerPtr listener;
273 mojo::shell::mojom::InstanceListenerRequest request = GetProxy(&listener); 273 mojo::shell::mojom::InstanceListenerRequest request = GetProxy(&listener);
274 application_manager->AddInstanceListener(std::move(listener)); 274 shell->AddInstanceListener(std::move(listener));
275 275
276 package_manager::mojom::CatalogPtr catalog; 276 package_manager::mojom::CatalogPtr catalog;
277 connector->ConnectToInterface("mojo:package_manager", &catalog); 277 connector->ConnectToInterface("mojo:package_manager", &catalog);
278 278
279 TaskViewerContents* task_viewer = new TaskViewerContents( 279 TaskViewerContents* task_viewer = new TaskViewerContents(
280 std::move(request), std::move(catalog)); 280 std::move(request), std::move(catalog));
281 views::Widget* window = views::Widget::CreateWindowWithBounds( 281 views::Widget* window = views::Widget::CreateWindowWithBounds(
282 task_viewer, gfx::Rect(10, 10, 500, 500)); 282 task_viewer, gfx::Rect(10, 10, 500, 500));
283 window->Show(); 283 window->Show();
284 } 284 }
285 285
286 } // namespace task_viewer 286 } // namespace task_viewer
287 } // namespace main 287 } // namespace main
OLDNEW
« no previous file with comments | « content/test/data/web_ui_mojo_shell_test.js ('k') | mojo/mojo_base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698