| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_WM_SHUTDOWN_CLIENT_PROXY_H_ | |
| 6 #define ASH_WM_SHUTDOWN_CLIENT_PROXY_H_ | |
| 7 | |
| 8 #include "ash/public/interfaces/shutdown.mojom.h" | |
| 9 #include "base/macros.h" | |
| 10 | |
| 11 namespace service_manager { | |
| 12 class Connector; | |
| 13 } | |
| 14 | |
| 15 namespace ash { | |
| 16 | |
| 17 // A ShutdownClientProxy which lazily connects to an exported | |
| 18 // mojom::ShutdownClient in "service:content_browser" on each use. This exists | |
| 19 // so we can replace an instance of this class with a TestShutdownClient in | |
| 20 // tests. | |
| 21 class ShutdownClientProxy : public mojom::ShutdownClient { | |
| 22 public: | |
| 23 explicit ShutdownClientProxy(service_manager::Connector* connector); | |
| 24 ~ShutdownClientProxy() override; | |
| 25 | |
| 26 // mojom::ShutdownClient: | |
| 27 void RequestShutdown() override; | |
| 28 | |
| 29 private: | |
| 30 service_manager::Connector* connector_; | |
| 31 | |
| 32 DISALLOW_COPY_AND_ASSIGN(ShutdownClientProxy); | |
| 33 }; | |
| 34 | |
| 35 } // namespace ash | |
| 36 | |
| 37 #endif // ASH_WM_SHUTDOWN_CLIENT_PROXY_H_ | |
| OLD | NEW |