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

Unified Diff: ash/mus/window_manager_application.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 | « ash/mus/window_manager_application.h ('k') | ash/touch_hud/mus/touch_hud_application.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager_application.cc
diff --git a/ash/mus/window_manager_application.cc b/ash/mus/window_manager_application.cc
index d12b63caed28137cf2cc7b9bdaeb6a5c8540c2c3..83c4a9b914cbb798f7ff96027d7344c4fbfcd644 100644
--- a/ash/mus/window_manager_application.cc
+++ b/ash/mus/window_manager_application.cc
@@ -117,27 +117,25 @@ void WindowManagerApplication::ShutdownComponents() {
message_center::MessageCenter::Shutdown();
}
-void WindowManagerApplication::OnStart(
- service_manager::ServiceContext* context) {
- context_ = context;
+void WindowManagerApplication::OnStart() {
aura_init_ = base::MakeUnique<views::AuraInit>(
- context->connector(), context->identity(), "ash_mus_resources.pak",
+ context()->connector(), context()->identity(), "ash_mus_resources.pak",
"ash_mus_resources_200.pak");
- gpu_service_ = ui::GpuService::Create(context->connector());
+ gpu_service_ = ui::GpuService::Create(context()->connector());
compositor_context_factory_.reset(
new views::SurfaceContextFactory(gpu_service_.get()));
aura::Env::GetInstance()->set_context_factory(
compositor_context_factory_.get());
- window_manager_.reset(new WindowManager(context->connector()));
+ window_manager_.reset(new WindowManager(context()->connector()));
MaterialDesignController::Initialize();
- tracing_.Initialize(context->connector(), context->identity().name());
+ tracing_.Initialize(context()->connector(), context()->identity().name());
std::unique_ptr<ui::WindowTreeClient> window_tree_client =
base::MakeUnique<ui::WindowTreeClient>(window_manager_.get(),
window_manager_.get());
- window_tree_client->ConnectAsWindowManager(context->connector());
+ window_tree_client->ConnectAsWindowManager(context()->connector());
const size_t kMaxNumberThreads = 3u; // Matches that of content.
const char kThreadNamePrefix[] = "MashBlocking";
@@ -154,7 +152,7 @@ bool WindowManagerApplication::OnConnect(
registry, base::ThreadTaskRunnerHandle::Get());
if (remote_info.identity.name() == "service:mash_session") {
- context_->connector()->ConnectToInterface(remote_info.identity, &session_);
+ context()->connector()->ConnectToInterface(remote_info.identity, &session_);
session_->AddScreenlockStateListener(
screenlock_state_listener_binding_.CreateInterfacePtrAndBind());
}
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | ash/touch_hud/mus/touch_hud_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698