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

Unified Diff: mash/screenlock/screenlock.cc

Issue 2509853002: Convert //mash to define service names in mojom (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/screenlock/public/interfaces/constants.mojom ('k') | mash/session/BUILD.gn » ('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 e0bda4266cffe74bc92c95c4241b80ef7bc253c3..b2a726bdd73dd047b2cc855ce3ed80e93283caac 100644
--- a/mash/screenlock/screenlock.cc
+++ b/mash/screenlock/screenlock.cc
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "mash/session/public/interfaces/constants.mojom.h"
#include "mash/session/public/interfaces/session.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "services/service_manager/public/cpp/connector.h"
@@ -60,7 +61,7 @@ class ScreenlockView : public views::WidgetDelegateView,
void ButtonPressed(views::Button* sender, const ui::Event& event) override {
DCHECK_EQ(sender, unlock_button_);
mash::session::mojom::SessionPtr session;
- connector_->ConnectToInterface("mash_session", &session);
+ connector_->ConnectToInterface(session::mojom::kServiceName, &session);
session->UnlockScreen();
}
@@ -79,7 +80,8 @@ void Screenlock::OnStart() {
tracing_.Initialize(context()->connector(), context()->identity().name());
mash::session::mojom::SessionPtr session;
- context()->connector()->ConnectToInterface("mash_session", &session);
+ context()->connector()->ConnectToInterface(session::mojom::kServiceName,
+ &session);
session->AddScreenlockStateListener(
bindings_.CreateInterfacePtrAndBind(this));
« no previous file with comments | « mash/screenlock/public/interfaces/constants.mojom ('k') | mash/session/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698