OLD | NEW |
---|---|
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 <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/gtest_prod_util.h" | |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
14 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
15 #include "base/time.h" | 16 #include "base/time.h" |
16 #include "chrome/browser/ui/autofill/account_chooser_model.h" | 17 #include "chrome/browser/ui/autofill/account_chooser_model.h" |
17 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | 18 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" |
18 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" | 19 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" |
19 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 20 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
20 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" | 21 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
21 #include "chrome/browser/ui/autofill/country_combobox_model.h" | 22 #include "chrome/browser/ui/autofill/country_combobox_model.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 virtual void OpenTabWithUrl(const GURL& url); | 281 virtual void OpenTabWithUrl(const GURL& url); |
281 | 282 |
282 // Whether |section| was sent into edit mode based on existing data. This | 283 // Whether |section| was sent into edit mode based on existing data. This |
283 // happens when a user clicks "Edit" or a suggestion is invalid. | 284 // happens when a user clicks "Edit" or a suggestion is invalid. |
284 virtual bool IsEditingExistingData(DialogSection section) const; | 285 virtual bool IsEditingExistingData(DialogSection section) const; |
285 | 286 |
286 // Should be called on the Wallet sign-in error. | 287 // Should be called on the Wallet sign-in error. |
287 virtual void OnWalletSigninError(); | 288 virtual void OnWalletSigninError(); |
288 | 289 |
289 private: | 290 private: |
291 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest, AutocompleteEvent); | |
292 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest, | |
293 AutocompleteErrorEventReasonInvalid); | |
294 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest, | |
295 AutocompleteErrorEventReasonCancel); | |
Ilya Sherman
2013/06/19 23:56:14
Why do we need to friend the tests? IMO it's much
Dan Beam
2013/06/20 00:26:57
AutofillDialogControllerImpl::view() (not TestAuto
Ilya Sherman
2013/06/20 01:11:27
I'd much rather expose a GetTestableView() method
Dan Beam
2013/06/20 01:47:09
Done.
| |
296 | |
290 // Whether or not the current request wants credit info back. | 297 // Whether or not the current request wants credit info back. |
291 bool RequestingCreditCardInfo() const; | 298 bool RequestingCreditCardInfo() const; |
292 | 299 |
293 // Whether the information input in this dialog will be securely transmitted | 300 // Whether the information input in this dialog will be securely transmitted |
294 // to the requesting site. | 301 // to the requesting site. |
295 bool TransmissionWillBeSecure() const; | 302 bool TransmissionWillBeSecure() const; |
296 | 303 |
297 // Initializes |suggested_email_| et al. | 304 // Initializes |suggested_email_| et al. |
298 void SuggestionsUpdated(); | 305 void SuggestionsUpdated(); |
299 | 306 |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
668 | 675 |
669 // Whether the latency to display to the UI was logged to UMA yet. | 676 // Whether the latency to display to the UI was logged to UMA yet. |
670 bool was_ui_latency_logged_; | 677 bool was_ui_latency_logged_; |
671 | 678 |
672 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 679 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
673 }; | 680 }; |
674 | 681 |
675 } // namespace autofill | 682 } // namespace autofill |
676 | 683 |
677 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 684 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
OLD | NEW |