| Index: components/arc/arc_auth_service.h
|
| diff --git a/components/arc/arc_auth_service.h b/components/arc/arc_auth_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e3e474d48236b4a7b2691bb5b3cfbfb63e79b67b
|
| --- /dev/null
|
| +++ b/components/arc/arc_auth_service.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2015 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 COMPONENTS_ARC_ARC_AUTH_SERVICE_H_
|
| +#define COMPONENTS_ARC_ARC_AUTH_SERVICE_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "components/arc/arc_bridge_service.h"
|
| +#include "components/arc/common/auth.mojom.h"
|
| +#include "mojo/public/cpp/bindings/binding.h"
|
| +
|
| +namespace arc {
|
| +
|
| +// This class proxies the request from the client to fetch an auth code from
|
| +// LSO.
|
| +class ArcAuthService : public AuthHost,
|
| + public ArcBridgeService::Observer {
|
| + public:
|
| + ArcAuthService();
|
| + virtual ~ArcAuthService();
|
| +
|
| + // Overrides ArcBridgeService::Observer
|
| + void OnAuthInstanceReady() override;
|
| +
|
| + // Overrides AuthHost
|
| + void GetAuthCode(const GetAuthCodeCallback& callback) override;
|
| +
|
| + // Starts listening to state changes of the ArcBridgeService.
|
| + // This must be called before the bridge service starts bootstrapping.
|
| + void StartObservingBridgeServiceChanges();
|
| +
|
| + private:
|
| + mojo::Binding<AuthHost> binding_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ArcAuthService);
|
| +};
|
| +
|
| +} // namespace arc
|
| +
|
| +#endif // COMPONENTS_ARC_ARC_AUTH_SERVICE_H_
|
|
|