Chromium Code Reviews| 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 |