Home | History | Annotate | Download | only in wallet
      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 
     10 class GoogleServiceAuthError;
     11 
     12 namespace autofill {
     13 namespace wallet {
     14 
     15 // An interface that defines the callbacks for objects that
     16 // WalletSigninHelper can return data to.
     17 class WalletSigninHelperDelegate {
     18  public:
     19   virtual ~WalletSigninHelperDelegate() {}
     20 
     21   // Called on a successful passive sign-in.
     22   // |username| is the signed-in user account name (email).
     23   virtual void OnPassiveSigninSuccess(const std::string& username) = 0;
     24 
     25   // Called on a failed passive sign-in; |error| describes the error.
     26   virtual void OnPassiveSigninFailure(const GoogleServiceAuthError& error) = 0;
     27 
     28   // Called on a successful fetch of the signed-in account name.
     29   // |username| is the signed-in user account name (email).
     30   virtual void OnUserNameFetchSuccess(const std::string& username) = 0;
     31 
     32   // Called on a failed fetch of the signed-in account name.
     33   // |error| described the error.
     34   virtual void OnUserNameFetchFailure(const GoogleServiceAuthError& error) = 0;
     35 
     36   // Called when the Google Wallet cookie value has been retrieved.
     37   virtual void OnDidFetchWalletCookieValue(const std::string& cookie_value) = 0;
     38 };
     39 
     40 }  // namespace wallet
     41 }  // namespace autofill
     42 
     43 #endif  // CHROME_BROWSER_UI_AUTOFILL_WALLET_SIGNIN_HELPER_DELEGATE_H_
     44