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 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" | 5 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/autofill/autocheckout_whitelist_manager_factory.h" | 9 #include "chrome/browser/autofill/autocheckout_whitelist_manager_factory.h" |
10 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" | 10 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 #else | 130 #else |
131 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); | 131 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); |
132 browser->window()->ShowPasswordGenerationBubble(bounds, form, generator); | 132 browser->window()->ShowPasswordGenerationBubble(bounds, form, generator); |
133 #endif // #if defined(OS_ANDROID) | 133 #endif // #if defined(OS_ANDROID) |
134 } | 134 } |
135 | 135 |
136 void TabAutofillManagerDelegate::ShowAutocheckoutBubble( | 136 void TabAutofillManagerDelegate::ShowAutocheckoutBubble( |
137 const gfx::RectF& bounding_box, | 137 const gfx::RectF& bounding_box, |
138 const gfx::NativeView& native_view, | 138 const gfx::NativeView& native_view, |
139 const base::Callback<void(bool)>& callback) { | 139 const base::Callback<void(bool)>& callback) { |
| 140 #if !defined(TOOLKIT_VIEWS) |
| 141 callback.Run(false); |
| 142 NOTIMPLEMENTED(); |
| 143 #else |
140 HideAutocheckoutBubble(); | 144 HideAutocheckoutBubble(); |
141 autocheckout_bubble_ = | 145 autocheckout_bubble_ = |
142 AutocheckoutBubble::Create(scoped_ptr<AutocheckoutBubbleController>( | 146 AutocheckoutBubble::Create(scoped_ptr<AutocheckoutBubbleController>( |
143 new AutocheckoutBubbleController(bounding_box, | 147 new AutocheckoutBubbleController(bounding_box, |
144 native_view, | 148 native_view, |
145 callback))); | 149 callback))); |
146 autocheckout_bubble_->ShowBubble(); | 150 autocheckout_bubble_->ShowBubble(); |
| 151 #endif // #if !defined(TOOLKIT_VIEWS) |
147 } | 152 } |
148 | 153 |
149 void TabAutofillManagerDelegate::HideAutocheckoutBubble() { | 154 void TabAutofillManagerDelegate::HideAutocheckoutBubble() { |
150 if (autocheckout_bubble_) | 155 if (autocheckout_bubble_) |
151 autocheckout_bubble_->HideBubble(); | 156 autocheckout_bubble_->HideBubble(); |
152 } | 157 } |
153 | 158 |
154 void TabAutofillManagerDelegate::ShowRequestAutocompleteDialog( | 159 void TabAutofillManagerDelegate::ShowRequestAutocompleteDialog( |
155 const FormData& form, | 160 const FormData& form, |
156 const GURL& source_url, | 161 const GURL& source_url, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 (dialog_controller_->dialog_type() == | 224 (dialog_controller_->dialog_type() == |
220 autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE || | 225 autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE || |
221 !dialog_controller_->AutocheckoutIsRunning())) { | 226 !dialog_controller_->AutocheckoutIsRunning())) { |
222 HideRequestAutocompleteDialog(); | 227 HideRequestAutocompleteDialog(); |
223 } | 228 } |
224 | 229 |
225 HideAutocheckoutBubble(); | 230 HideAutocheckoutBubble(); |
226 } | 231 } |
227 | 232 |
228 } // namespace autofill | 233 } // namespace autofill |
OLD | NEW |