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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.h

Issue 13331007: Multi-account AccountChooser for interactive autocomplete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Indent fix. Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/string16.h" 14 #include "base/string16.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "chrome/browser/ui/autofill/account_chooser_model.h"
16 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 17 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
17 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" 18 #include "chrome/browser/ui/autofill/autofill_dialog_models.h"
18 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 19 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
19 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" 20 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
20 #include "chrome/browser/ui/autofill/country_combobox_model.h" 21 #include "chrome/browser/ui/autofill/country_combobox_model.h"
21 #include "components/autofill/browser/autofill_manager_delegate.h" 22 #include "components/autofill/browser/autofill_manager_delegate.h"
22 #include "components/autofill/browser/autofill_metrics.h" 23 #include "components/autofill/browser/autofill_metrics.h"
23 #include "components/autofill/browser/autofill_popup_delegate.h" 24 #include "components/autofill/browser/autofill_popup_delegate.h"
24 #include "components/autofill/browser/field_types.h" 25 #include "components/autofill/browser/field_types.h"
25 #include "components/autofill/browser/form_structure.h" 26 #include "components/autofill/browser/form_structure.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 base::Callback<void(const FormStructure*, const std::string&)> callback_; 375 base::Callback<void(const FormStructure*, const std::string&)> callback_;
375 376
376 // The AccountChooserModel acts as the MenuModel for the account chooser, 377 // The AccountChooserModel acts as the MenuModel for the account chooser,
377 // and also tracks which data source the dialog is using. 378 // and also tracks which data source the dialog is using.
378 AccountChooserModel account_chooser_model_; 379 AccountChooserModel account_chooser_model_;
379 380
380 // The sign-in helper to fetch the user info and perform passive sign-in. 381 // The sign-in helper to fetch the user info and perform passive sign-in.
381 // The helper is set only during fetch/sign-in, and NULL otherwise. 382 // The helper is set only during fetch/sign-in, and NULL otherwise.
382 scoped_ptr<wallet::WalletSigninHelper> signin_helper_; 383 scoped_ptr<wallet::WalletSigninHelper> signin_helper_;
383 384
384 // The user account name (email).
385 // Valid only if PayingWithWallet() and SigninState() == SIGNED_IN.
386 // Set whenever the sign-in helper fetches the user info.
387 // TODO(aruslan): this should be removed (AccountChooser should deal with it).
388 std::string current_username_;
389
390 // A client to talk to the Online Wallet API. 385 // A client to talk to the Online Wallet API.
391 wallet::WalletClient wallet_client_; 386 wallet::WalletClient wallet_client_;
392 387
393 // Recently received items retrieved via |wallet_client_|. 388 // Recently received items retrieved via |wallet_client_|.
394 scoped_ptr<wallet::WalletItems> wallet_items_; 389 scoped_ptr<wallet::WalletItems> wallet_items_;
395 scoped_ptr<wallet::FullWallet> full_wallet_; 390 scoped_ptr<wallet::FullWallet> full_wallet_;
396 391
397 // The text to display when the user is accepting new terms of service, etc. 392 // The text to display when the user is accepting new terms of service, etc.
398 string16 legal_documents_text_; 393 string16 legal_documents_text_;
399 // The ranges within |legal_documents_text_| to linkify. 394 // The ranges within |legal_documents_text_| to linkify.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 458
464 // Whether or not there was an error in the Autocheckout flow. 459 // Whether or not there was an error in the Autocheckout flow.
465 bool had_autocheckout_error_; 460 bool had_autocheckout_error_;
466 461
467 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 462 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
468 }; 463 };
469 464
470 } // namespace autofill 465 } // namespace autofill
471 466
472 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 467 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698