Index: ash/wm/shutdown_client_proxy.h |
diff --git a/ash/wm/shutdown_client_proxy.h b/ash/wm/shutdown_client_proxy.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d88d0db2f9eaf3a8d61fb39b26d801efab6e0199 |
--- /dev/null |
+++ b/ash/wm/shutdown_client_proxy.h |
@@ -0,0 +1,36 @@ |
+// 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. |
+ |
+#ifndef ASH_WM_SHUTDOWN_CLIENT_PROXY_H_ |
+#define ASH_WM_SHUTDOWN_CLIENT_PROXY_H_ |
+ |
+#include "ash/public/interfaces/shutdown.mojom.h" |
+#include "base/macros.h" |
+ |
+namespace service_manager { |
+class Connector; |
+} |
+ |
+namespace ash { |
+ |
+// A ShutdownClientProxy which lazily connects to an exported |
+// mojom::ShutdownClient in "service:content_browser" on each use. This exists |
+// so we can mock this interface. |
sky
2016/11/02 23:06:52
What do you mean by mocking? I don't see any subcl
Elliot Glaysher
2016/11/02 23:12:28
Replaced comment with explicit reference to TestSh
|
+class ShutdownClientProxy : public mojom::ShutdownClient { |
+ public: |
+ explicit ShutdownClientProxy(service_manager::Connector* connector); |
+ ~ShutdownClientProxy() override; |
+ |
+ // mojom::ShutdownClient: |
+ void RequestShutdown() override; |
+ |
+ private: |
+ service_manager::Connector* connector_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ShutdownClientProxy); |
+}; |
+ |
+} // namespace ash |
+ |
+#endif // ASH_WM_SHUTDOWN_CLIENT_PROXY_H_ |