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 53c6a909b9ebd952377b4e1752ff00b20a4aad86..a751000fbb56ac06215366ea898ad7d208ee3237 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" |
@@ -121,12 +121,14 @@ void TabAutofillManagerDelegate::ShowAutocheckoutBubble( |
gfx::RectF anchor = bounding_box + container_rect.OffsetFromOrigin(); |
autocheckout_bubble_ = |
- AutocheckoutBubble::Create(scoped_ptr<AutocheckoutBubbleController>( |
- new AutocheckoutBubbleController( |
- anchor, |
- web_contents_->GetView()->GetTopLevelNativeWindow(), |
- is_google_user, |
- callback))); |
+ AutocheckoutBubble::Create( |
+ web_contents_, |
+ scoped_ptr<AutocheckoutBubbleController>( |
+ new AutocheckoutBubbleController( |
+ anchor, |
+ web_contents_->GetView()->GetTopLevelNativeWindow(), |
+ is_google_user, |
+ callback))); |
autocheckout_bubble_->ShowBubble(); |
#endif // #if !defined(TOOLKIT_VIEWS) |
} |
@@ -142,19 +144,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, |
aruslan
2013/08/07 21:07:00
Indent.
aruslan
2013/08/07 21:21:23
Done.
|
+ source_url, |
+ dialog_type, |
+ callback); |
+ if (dialog_controller_) { |
+ dialog_controller_->Show(); |
+ } else { |
+ callback.Run(NULL, std::string()); |
+ NOTIMPLEMENTED(); |
+ } |
} |
void TabAutofillManagerDelegate::ShowAutofillPopup( |
@@ -231,7 +233,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(); |
} |