Chromium Code Reviews| 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..f859b585251047c3722b710b70e31b4f951e8f86 |
| --- /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. |
| +class ShutdownClientProxy : public mojom::ShutdownClient { |
| + public: |
| + ShutdownClientProxy(service_manager::Connector* connector); |
|
James Cook
2016/11/02 20:20:04
nit: explicit
Elliot Glaysher
2016/11/02 21:45:16
Done.
|
| + ~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_ |