Upstream version 6.35.121.0
[platform/framework/web/crosswalk.git] / src / components / signin / core / browser / signin_client.h
1 // Copyright 2014 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_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_
7
8 #include "components/signin/core/browser/webdata/token_web_data.h"
9
10 class PrefService;
11 class SigninManagerBase;
12 class TokenWebData;
13
14 namespace net {
15 class URLRequestContextGetter;
16 }
17
18 // An interface that needs to be supplied to the Signin component by its
19 // embedder.
20 class SigninClient {
21  public:
22   virtual ~SigninClient() {}
23
24   // Gets the preferences associated with the client.
25   virtual PrefService* GetPrefs() = 0;
26
27   // Gets the TokenWebData instance associated with the client.
28   virtual scoped_refptr<TokenWebData> GetDatabase() = 0;
29
30   // Returns whether it is possible to revoke credentials.
31   virtual bool CanRevokeCredentials() = 0;
32
33   // Returns the URL request context information associated with the client.
34   virtual net::URLRequestContextGetter* GetURLRequestContext() = 0;
35
36   // Called when Google signin has succeeded.
37   virtual void GoogleSigninSucceeded(const std::string& username,
38                                      const std::string& password) {}
39 };
40
41 #endif  // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_CLIENT_H_