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

Unified Diff: mash/task_viewer/task_viewer_application_delegate.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/task_viewer/task_viewer_application_delegate.h ('k') | mash/wallpaper/wallpaper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/task_viewer/task_viewer_application_delegate.cc
diff --git a/mash/task_viewer/task_viewer_application_delegate.cc b/mash/task_viewer/task_viewer_application_delegate.cc
index cd2ea756c0dbdea325c57a25b3d463db2baef4a3..cac01ee34eabcf77d6e968b4db087c117939baf0 100644
--- a/mash/task_viewer/task_viewer_application_delegate.cc
+++ b/mash/task_viewer/task_viewer_application_delegate.cc
@@ -14,7 +14,7 @@
#include "base/strings/utf_string_conversions.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/shell/public/cpp/application_connection.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "mojo/shell/public/interfaces/application_manager.mojom.h"
#include "ui/base/models/table_model.h"
#include "ui/views/background.h"
@@ -235,21 +235,23 @@ TaskViewerApplicationDelegate::TaskViewerApplicationDelegate() {}
TaskViewerApplicationDelegate::~TaskViewerApplicationDelegate() {}
-void TaskViewerApplicationDelegate::Initialize(mojo::ApplicationImpl* app) {
- tracing_.Initialize(app);
+void TaskViewerApplicationDelegate::Initialize(mojo::Shell* shell,
+ const std::string& url,
+ uint32_t id) {
+ tracing_.Initialize(shell, url);
- aura_init_.reset(new views::AuraInit(app, "views_mus_resources.pak"));
- views::WindowManagerConnection::Create(app);
+ aura_init_.reset(new views::AuraInit(shell, "views_mus_resources.pak"));
+ views::WindowManagerConnection::Create(shell);
mojo::shell::mojom::ApplicationManagerPtr application_manager;
- app->ConnectToService("mojo:shell", &application_manager);
+ shell->ConnectToService("mojo:shell", &application_manager);
mojo::shell::mojom::ApplicationManagerListenerPtr listener;
ListenerRequest request = GetProxy(&listener);
application_manager->AddListener(std::move(listener));
TaskViewer* task_viewer = new TaskViewer(
- std::move(request), app->app_lifetime_helper()->CreateAppRefCount());
+ std::move(request), shell->CreateAppRefCount());
views::Widget* window = views::Widget::CreateWindowWithBounds(
task_viewer, gfx::Rect(10, 10, 500, 500));
window->Show();
« no previous file with comments | « mash/task_viewer/task_viewer_application_delegate.h ('k') | mash/wallpaper/wallpaper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698