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