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

Unified Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc

Issue 22623002: Extract AutofillDialogController interface and common utilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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
« no previous file with comments | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
diff --git a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
index cf4ab39d42e92b545927d82d9a5230338127f41f..4b5094903ca815ca029ee36dc7c6bd85cb749490 100644
--- a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
+++ b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/autofill/autocheckout_bubble.h"
#include "chrome/browser/ui/autofill/autocheckout_bubble_controller.h"
-#include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h"
+#include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
@@ -150,19 +150,19 @@ void TabAutofillManagerDelegate::ShowRequestAutocompleteDialog(
DialogType dialog_type,
const base::Callback<void(const FormStructure*,
const std::string&)>& callback) {
-#if defined(ENABLE_AUTOFILL_DIALOG)
HideRequestAutocompleteDialog();
- dialog_controller_ = AutofillDialogControllerImpl::Create(web_contents_,
- form,
- source_url,
- dialog_type,
- callback);
- dialog_controller_->Show();
-#else
- callback.Run(NULL, std::string());
- NOTIMPLEMENTED();
-#endif // #if !defined(ENABLE_AUTOFILL_DIALOG)
+ dialog_controller_ = AutofillDialogController::Create(web_contents_,
+ form,
+ source_url,
+ dialog_type,
+ callback);
+ if (dialog_controller_) {
+ dialog_controller_->Show();
+ } else {
+ callback.Run(NULL, std::string());
+ NOTIMPLEMENTED();
+ }
}
void TabAutofillManagerDelegate::ShowAutofillPopup(
@@ -246,7 +246,7 @@ void TabAutofillManagerDelegate::DidNavigateMainFrame(
bool was_redirect = details.entry &&
content::PageTransitionIsRedirect(details.entry->GetTransitionType());
- if (dialog_controller_->dialog_type() == DIALOG_TYPE_REQUEST_AUTOCOMPLETE ||
+ if (dialog_controller_->GetDialogType() == DIALOG_TYPE_REQUEST_AUTOCOMPLETE ||
(!was_redirect && !preserve_dialog)) {
HideRequestAutocompleteDialog();
}
« no previous file with comments | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698