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

Unified Diff: mash/screenlock/screenlock.cc

Issue 2179023004: Make Service own ServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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/screenlock/screenlock.h ('k') | mash/session/session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/screenlock/screenlock.cc
diff --git a/mash/screenlock/screenlock.cc b/mash/screenlock/screenlock.cc
index 8a377bace883d4223f62e6380f74f8a3136b7911..62bbefc3c22d417e30c2f230daf90531a0958138 100644
--- a/mash/screenlock/screenlock.cc
+++ b/mash/screenlock/screenlock.cc
@@ -75,24 +75,23 @@ class ScreenlockView : public views::WidgetDelegateView,
Screenlock::Screenlock() {}
Screenlock::~Screenlock() {}
-void Screenlock::OnStart(shell::Connector* connector,
- const shell::Identity& identity,
- uint32_t id) {
- tracing_.Initialize(connector, identity.name());
+void Screenlock::OnStart(const shell::Identity& identity) {
+ tracing_.Initialize(connector(), identity.name());
mash::session::mojom::SessionPtr session;
- connector->ConnectToInterface("mojo:mash_session", &session);
+ connector()->ConnectToInterface("mojo:mash_session", &session);
session->AddScreenlockStateListener(
bindings_.CreateInterfacePtrAndBind(this));
- aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
+ aura_init_.reset(
+ new views::AuraInit(connector(), "views_mus_resources.pak"));
window_manager_connection_ =
- views::WindowManagerConnection::Create(connector, identity);
+ views::WindowManagerConnection::Create(connector(), identity);
views::Widget* widget = new views::Widget;
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.delegate = new ScreenlockView(connector);
+ params.delegate = new ScreenlockView(connector());
std::map<std::string, std::vector<uint8_t>> properties;
properties[ash::mojom::kWindowContainer_Property] =
@@ -101,7 +100,7 @@ void Screenlock::OnStart(shell::Connector* connector,
ui::Window* window =
views::WindowManagerConnection::Get()->NewWindow(properties);
params.native_widget = new views::NativeWidgetMus(
- widget, connector, window, ui::mojom::SurfaceType::DEFAULT);
+ widget, connector(), window, ui::mojom::SurfaceType::DEFAULT);
widget->Init(params);
widget->Show();
}
« no previous file with comments | « mash/screenlock/screenlock.h ('k') | mash/session/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698