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

Unified Diff: mash/example/window_type_launcher/window_type_launcher.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/example/window_type_launcher/public/interfaces/constants.mojom ('k') | mash/init/init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/example/window_type_launcher/window_type_launcher.cc
diff --git a/mash/example/window_type_launcher/window_type_launcher.cc b/mash/example/window_type_launcher/window_type_launcher.cc
index cfb1b02c73e83519a064634d89b36814def1ac14..a8b03ed15f4797b13bca5e687237c35da30e958c 100644
--- a/mash/example/window_type_launcher/window_type_launcher.cc
+++ b/mash/example/window_type_launcher/window_type_launcher.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/platform_thread.h"
+#include "mash/session/public/interfaces/constants.mojom.h"
#include "mash/session/public/interfaces/session.mojom.h"
#include "services/service_manager/public/c/main.h"
#include "services/service_manager/public/cpp/connection.h"
@@ -372,15 +373,18 @@ class WindowTypeLauncherView : public views::WidgetDelegateView,
NOTIMPLEMENTED();
} else if (sender == lock_button_) {
mash::session::mojom::SessionPtr session;
- connector_->ConnectToInterface("mash_session", &session);
+ connector_->ConnectToInterface(mash::session::mojom::kServiceName,
+ &session);
session->LockScreen();
} else if (sender == logout_button_) {
mash::session::mojom::SessionPtr session;
- connector_->ConnectToInterface("mash_session", &session);
+ connector_->ConnectToInterface(mash::session::mojom::kServiceName,
+ &session);
session->Logout();
} else if (sender == switch_user_button_) {
mash::session::mojom::SessionPtr session;
- connector_->ConnectToInterface("mash_session", &session);
+ connector_->ConnectToInterface(mash::session::mojom::kServiceName,
+ &session);
session->SwitchUser();
} else if (sender == widgets_button_) {
NOTIMPLEMENTED();
« no previous file with comments | « mash/example/window_type_launcher/public/interfaces/constants.mojom ('k') | mash/init/init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698