OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 COMPONENTS_ARC_ARC_AUTH_SERVICE_H_ |
| 6 #define COMPONENTS_ARC_ARC_AUTH_SERVICE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/arc/arc_bridge_service.h" |
| 10 #include "components/arc/common/auth.mojom.h" |
| 11 #include "mojo/public/cpp/bindings/binding.h" |
| 12 |
| 13 namespace arc { |
| 14 |
| 15 // This class proxies the request from the client to fetch an auth code from |
| 16 // LSO. |
| 17 class ArcAuthService : public AuthHost, |
| 18 public ArcBridgeService::Observer { |
| 19 public: |
| 20 ArcAuthService(); |
| 21 virtual ~ArcAuthService(); |
| 22 |
| 23 // Overrides ArcBridgeService::Observer |
| 24 void OnAuthInstanceReady() override; |
| 25 |
| 26 // Overrides AuthHost |
| 27 void GetAuthCode(const GetAuthCodeCallback& callback) override; |
| 28 |
| 29 // Starts listening to state changes of the ArcBridgeService. |
| 30 // This must be called before the bridge service starts bootstrapping. |
| 31 void StartObservingBridgeServiceChanges(); |
| 32 |
| 33 private: |
| 34 mojo::Binding<AuthHost> binding_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(ArcAuthService); |
| 37 }; |
| 38 |
| 39 } // namespace arc |
| 40 |
| 41 #endif // COMPONENTS_ARC_ARC_AUTH_SERVICE_H_ |
OLD | NEW |