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

Unified Diff: mash/task_viewer/task_viewer.cc

Issue 2487573002: Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: rebase Created 4 years, 1 month 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.h ('k') | mash/webtest/webtest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/task_viewer/task_viewer.cc
diff --git a/mash/task_viewer/task_viewer.cc b/mash/task_viewer/task_viewer.cc
index 1950037f2aec59be53003c92fa96216d8ad0030c..f48a56b28fec8646d4cfb8891d0632798c20bb42 100644
--- a/mash/task_viewer/task_viewer.cc
+++ b/mash/task_viewer/task_viewer.cc
@@ -289,15 +289,13 @@ void TaskViewer::RemoveWindow(views::Widget* widget) {
base::MessageLoop::current()->QuitWhenIdle();
}
-void TaskViewer::OnStart(service_manager::ServiceContext* context) {
- context_ = context;
-
- tracing_.Initialize(context->connector(), context->identity().name());
+void TaskViewer::OnStart() {
+ tracing_.Initialize(context()->connector(), context()->identity().name());
aura_init_ = base::MakeUnique<views::AuraInit>(
- context->connector(), context->identity(), "views_mus_resources.pak");
+ context()->connector(), context()->identity(), "views_mus_resources.pak");
window_manager_connection_ = views::WindowManagerConnection::Create(
- context->connector(), context->identity());
+ context()->connector(), context()->identity());
}
bool TaskViewer::OnConnect(const service_manager::ServiceInfo& remote_info,
@@ -315,7 +313,7 @@ void TaskViewer::Launch(uint32_t what, mojom::LaunchMode how) {
}
service_manager::mojom::ServiceManagerPtr service_manager;
- context_->connector()->ConnectToInterface(
+ context()->connector()->ConnectToInterface(
"service:service_manager", &service_manager);
service_manager::mojom::ServiceManagerListenerPtr listener;
@@ -324,7 +322,7 @@ void TaskViewer::Launch(uint32_t what, mojom::LaunchMode how) {
service_manager->AddListener(std::move(listener));
catalog::mojom::CatalogPtr catalog;
- context_->connector()->ConnectToInterface("service:catalog", &catalog);
+ context()->connector()->ConnectToInterface("service:catalog", &catalog);
TaskViewerContents* task_viewer = new TaskViewerContents(
this, std::move(request), std::move(catalog));
« no previous file with comments | « mash/task_viewer/task_viewer.h ('k') | mash/webtest/webtest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698