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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 135933003: rAc: split TestableAutofillDialogView implementation into its own class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dont play with fire Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/autofill/autofill_dialog_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 7aff91529a2380f8e689dcadc523e7cd4f3b4314..12847b32b9b3d76f7c36074cb10f8603ffb00d7d 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -1444,78 +1444,11 @@ void AutofillDialogViews::ModelChanged() {
}
}
-TestableAutofillDialogView* AutofillDialogViews::GetTestableView() {
- return this;
-}
-
void AutofillDialogViews::OnSignInResize(const gfx::Size& pref_size) {
sign_in_web_view_->SetPreferredSize(pref_size);
ContentsPreferredSizeChanged();
}
-void AutofillDialogViews::SubmitForTesting() {
- Accept();
-}
-
-void AutofillDialogViews::CancelForTesting() {
- GetDialogClientView()->CancelWindow();
-}
-
-base::string16 AutofillDialogViews::GetTextContentsOfInput(
- ServerFieldType type) {
- views::Textfield* textfield = TextfieldForType(type);
- if (textfield)
- return textfield->text();
-
- views::Combobox* combobox = ComboboxForType(type);
- if (combobox)
- return combobox->model()->GetItemAt(combobox->selected_index());
-
- NOTREACHED();
- return base::string16();
-}
-
-void AutofillDialogViews::SetTextContentsOfInput(
- ServerFieldType type,
- const base::string16& contents) {
- views::Textfield* textfield = TextfieldForType(type);
- if (textfield) {
- textfield->SetText(contents);
- return;
- }
-
- views::Combobox* combobox = ComboboxForType(type);
- if (combobox) {
- SelectComboboxValueOrSetToDefault(combobox, contents);
- return;
- }
-
- NOTREACHED();
-}
-
-void AutofillDialogViews::SetTextContentsOfSuggestionInput(
- DialogSection section,
- const base::string16& text) {
- GroupForSection(section)->suggested_info->decorated_textfield()->
- SetText(text);
-}
-
-void AutofillDialogViews::ActivateInput(ServerFieldType type) {
- TextfieldEditedOrActivated(TextfieldForType(type), false);
-}
-
-gfx::Size AutofillDialogViews::GetSize() const {
- return GetWidget() ? GetWidget()->GetRootView()->size() : gfx::Size();
-}
-
-content::WebContents* AutofillDialogViews::GetSignInWebContents() {
- return sign_in_web_view_->web_contents();
-}
-
-bool AutofillDialogViews::IsShowingOverlay() const {
- return overlay_view_->visible();
-}
-
gfx::Size AutofillDialogViews::GetPreferredSize() {
if (preferred_size_.IsEmpty())
preferred_size_ = CalculatePreferredSize(false);

Powered by Google App Engine
This is Rietveld 408576698