Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Side by Side Diff: components/arc/arc_auth_service.h

Issue 1553613002: Add ArcAuthService to handle IPC request from ARC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698