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

Unified Diff: mash/catalog_viewer/catalog_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/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 c2adf45d3510cd57cb91b2f9f45b18d9668c3fb3..73cbcfc09e40d2e9c63d4bd248d4fcdd5aacc3fb 100644
--- a/mash/catalog_viewer/catalog_viewer.cc
+++ b/mash/catalog_viewer/catalog_viewer.cc
@@ -217,14 +217,13 @@ void CatalogViewer::RemoveWindow(views::Widget* window) {
base::MessageLoop::current()->QuitWhenIdle();
}
-void CatalogViewer::OnStart(service_manager::ServiceContext* context) {
- context_ = context;
- tracing_.Initialize(context->connector(), context->identity().name());
+void CatalogViewer::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 CatalogViewer::OnConnect(const service_manager::ServiceInfo& remote_info,
@@ -241,7 +240,7 @@ void CatalogViewer::Launch(uint32_t what, mojom::LaunchMode how) {
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