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

Unified Diff: mash/catalog_viewer/catalog_viewer.cc

Issue 2500683002: Revert of Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: 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/catalog_viewer/catalog_viewer.h ('k') | mash/example/views_examples/views_examples.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/catalog_viewer/catalog_viewer.cc
diff --git a/mash/catalog_viewer/catalog_viewer.cc b/mash/catalog_viewer/catalog_viewer.cc
index 73cbcfc09e40d2e9c63d4bd248d4fcdd5aacc3fb..c2adf45d3510cd57cb91b2f9f45b18d9668c3fb3 100644
--- a/mash/catalog_viewer/catalog_viewer.cc
+++ b/mash/catalog_viewer/catalog_viewer.cc
@@ -217,13 +217,14 @@
base::MessageLoop::current()->QuitWhenIdle();
}
-void CatalogViewer::OnStart() {
- tracing_.Initialize(context()->connector(), context()->identity().name());
+void CatalogViewer::OnStart(service_manager::ServiceContext* context) {
+ context_ = context;
+ 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 CatalogViewer::OnConnect(const service_manager::ServiceInfo& remote_info,
@@ -240,7 +241,7 @@
return;
}
catalog::mojom::CatalogPtr catalog;
- context()->connector()->ConnectToInterface("service:catalog", &catalog);
+ context_->connector()->ConnectToInterface("service:catalog", &catalog);
views::Widget* window = views::Widget::CreateWindowWithContextAndBounds(
new CatalogViewerContents(this, std::move(catalog)), nullptr,
« no previous file with comments | « mash/catalog_viewer/catalog_viewer.h ('k') | mash/example/views_examples/views_examples.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698