- add sources.
[platform/framework/web/crosswalk.git] / src / components / autofill / content / browser / wallet / wallet_signin_helper_delegate.h
1 // Copyright 2013 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_UI_AUTOFILL_WALLET_SIGNIN_HELPER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_WALLET_SIGNIN_HELPER_DELEGATE_H_
7
8 #include <string>
9 #include <vector>
10
11 class GoogleServiceAuthError;
12
13 namespace autofill {
14 namespace wallet {
15
16 // An interface that defines the callbacks for objects that
17 // WalletSigninHelper can return data to.
18 class WalletSigninHelperDelegate {
19  public:
20   virtual ~WalletSigninHelperDelegate() {}
21
22   // Called on a successful passive sign-in.
23   // |usernames| contains the signed-in user account names (emails).
24   virtual void OnPassiveSigninSuccess(const std::vector<std::string>& usernames)
25       = 0;
26
27   // Called on a failed passive sign-in; |error| describes the error.
28   virtual void OnPassiveSigninFailure(const GoogleServiceAuthError& error) = 0;
29
30   // Called on a successful fetch of the signed-in account name.
31   // |usernames| contains the signed-in user account names (emails).
32   virtual void OnUserNameFetchSuccess(const std::vector<std::string>& usernames)
33       = 0;
34
35   // Called on a failed fetch of the signed-in account name.
36   // |error| described the error.
37   virtual void OnUserNameFetchFailure(const GoogleServiceAuthError& error) = 0;
38
39   // Called when the Google Wallet cookie value has been retrieved.
40   virtual void OnDidFetchWalletCookieValue(const std::string& cookie_value) = 0;
41 };
42
43 }  // namespace wallet
44 }  // namespace autofill
45
46 #endif  // CHROME_BROWSER_UI_AUTOFILL_WALLET_SIGNIN_HELPER_DELEGATE_H_