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

Unified Diff: ash/wm/shutdown_client_proxy.cc

Issue 2471643002: mash: remove the LockStateControllerDelegate. (Closed)
Patch Set: Add bug links + modify other overlay.json file. 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
Index: ash/wm/shutdown_client_proxy.cc
diff --git a/ash/wm/shutdown_client_proxy.cc b/ash/wm/shutdown_client_proxy.cc
new file mode 100644
index 0000000000000000000000000000000000000000..316df3a49abe9cb72d7c79e05c796e879076a600
--- /dev/null
+++ b/ash/wm/shutdown_client_proxy.cc
@@ -0,0 +1,23 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/wm/shutdown_client_proxy.h"
+
+#include "ash/public/interfaces/shutdown.mojom.h"
+#include "services/service_manager/public/cpp/connector.h"
+
+namespace ash {
+
+ShutdownClientProxy::ShutdownClientProxy(service_manager::Connector* connector)
+ : connector_(connector) {}
James Cook 2016/11/02 20:20:03 nit: DCHECK connector_ (makes the parameter nullab
Elliot Glaysher 2016/11/02 21:45:16 Done.
Elliot Glaysher 2016/11/02 22:20:47 Reverted this one hunk. Breaks tests.
+
+ShutdownClientProxy::~ShutdownClientProxy() {}
+
+void ShutdownClientProxy::RequestShutdown() {
+ mojom::ShutdownClientPtr client;
+ connector_->ConnectToInterface("service:content_browser", &client);
+ client->RequestShutdown();
+}
+
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698