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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 148413002: Add "previewing on hover" support for single-field autocomplete input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update code as per review comments Created 6 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/autofill_dialog_controller_impl.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 void AutofillDialogControllerImpl::OnPopupHidden() {} 2261 void AutofillDialogControllerImpl::OnPopupHidden() {}
2262 2262
2263 bool AutofillDialogControllerImpl::ShouldRepostEvent( 2263 bool AutofillDialogControllerImpl::ShouldRepostEvent(
2264 const ui::MouseEvent& event) { 2264 const ui::MouseEvent& event) {
2265 DCHECK_NE(UNKNOWN_TYPE, popup_input_type_); 2265 DCHECK_NE(UNKNOWN_TYPE, popup_input_type_);
2266 // If the event would be reposted inside the input showing an Autofill popup, 2266 // If the event would be reposted inside the input showing an Autofill popup,
2267 // just ignore. 2267 // just ignore.
2268 return !view_->HitTestInput(popup_input_type_, event.location()); 2268 return !view_->HitTestInput(popup_input_type_, event.location());
2269 } 2269 }
2270 2270
2271 void AutofillDialogControllerImpl::DidSelectSuggestion(int identifier) { 2271 void AutofillDialogControllerImpl::DidSelectSuggestion(
2272 int identifier,
2273 const base::string16& value) {
2272 // TODO(estade): implement. 2274 // TODO(estade): implement.
2273 } 2275 }
2274 2276
2275 void AutofillDialogControllerImpl::DidAcceptSuggestion( 2277 void AutofillDialogControllerImpl::DidAcceptSuggestion(
2276 const base::string16& value, 2278 const base::string16& value,
2277 int identifier) { 2279 int identifier) {
2278 DCHECK_NE(UNKNOWN_TYPE, popup_input_type_); 2280 DCHECK_NE(UNKNOWN_TYPE, popup_input_type_);
2279 // Because |HidePopup()| can be called from |UpdateSection()|, remember the 2281 // Because |HidePopup()| can be called from |UpdateSection()|, remember the
2280 // type of the input for later here. 2282 // type of the input for later here.
2281 const ServerFieldType popup_input_type = popup_input_type_; 2283 const ServerFieldType popup_input_type = popup_input_type_;
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
3814 view_->UpdateButtonStrip(); 3816 view_->UpdateButtonStrip();
3815 } 3817 }
3816 3818
3817 void AutofillDialogControllerImpl::FetchWalletCookie() { 3819 void AutofillDialogControllerImpl::FetchWalletCookie() {
3818 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); 3820 net::URLRequestContextGetter* request_context = profile_->GetRequestContext();
3819 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); 3821 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context));
3820 signin_helper_->StartWalletCookieValueFetch(); 3822 signin_helper_->StartWalletCookieValueFetch();
3821 } 3823 }
3822 3824
3823 } // namespace autofill 3825 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698