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

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: 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 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 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 DCHECK_NE(UNKNOWN_TYPE, popup_input_type_); 2147 DCHECK_NE(UNKNOWN_TYPE, popup_input_type_);
2148 // If the event would be reposted inside the input showing an Autofill popup, 2148 // If the event would be reposted inside the input showing an Autofill popup,
2149 // just ignore. 2149 // just ignore.
2150 return !view_->HitTestInput(popup_input_type_, event.location()); 2150 return !view_->HitTestInput(popup_input_type_, event.location());
2151 } 2151 }
2152 2152
2153 void AutofillDialogControllerImpl::DidSelectSuggestion(int identifier) { 2153 void AutofillDialogControllerImpl::DidSelectSuggestion(int identifier) {
2154 // TODO(estade): implement. 2154 // TODO(estade): implement.
2155 } 2155 }
2156 2156
2157 void AutofillDialogControllerImpl::DidSelectAutocompleteSuggestion(
2158 const base::string16& value) {
2159 // TODO: inline with DidSelectSuggestion() implementation.
2160 }
2161
2157 void AutofillDialogControllerImpl::DidAcceptSuggestion( 2162 void AutofillDialogControllerImpl::DidAcceptSuggestion(
2158 const base::string16& value, 2163 const base::string16& value,
2159 int identifier) { 2164 int identifier) {
2160 DCHECK_NE(UNKNOWN_TYPE, popup_input_type_); 2165 DCHECK_NE(UNKNOWN_TYPE, popup_input_type_);
2161 // Because |HidePopup()| can be called from |UpdateSection()|, remember the 2166 // Because |HidePopup()| can be called from |UpdateSection()|, remember the
2162 // type of the input for later here. 2167 // type of the input for later here.
2163 const ServerFieldType popup_input_type = popup_input_type_; 2168 const ServerFieldType popup_input_type = popup_input_type_;
2164 2169
2165 ScopedViewUpdates updates(view_.get()); 2170 ScopedViewUpdates updates(view_.get());
2166 const PersonalDataManager::GUIDPair& pair = popup_guids_[identifier]; 2171 const PersonalDataManager::GUIDPair& pair = popup_guids_[identifier];
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 void AutofillDialogControllerImpl::RemoveSuggestion( 2231 void AutofillDialogControllerImpl::RemoveSuggestion(
2227 const base::string16& value, 2232 const base::string16& value,
2228 int identifier) { 2233 int identifier) {
2229 // TODO(estade): implement. 2234 // TODO(estade): implement.
2230 } 2235 }
2231 2236
2232 void AutofillDialogControllerImpl::ClearPreviewedForm() { 2237 void AutofillDialogControllerImpl::ClearPreviewedForm() {
2233 // TODO(estade): implement. 2238 // TODO(estade): implement.
2234 } 2239 }
2235 2240
2241 void AutofillDialogControllerImpl::ClearAutocompletePreviewedField() {
2242 // TODO: inline with ClearPreviewedForm() implementation.
Evan Stade 2014/01/27 17:43:17 TODOs need to have your name on them. That said, t
ziran.sun 2014/01/27 18:18:06 Done.
2243 }
2244
2236 //////////////////////////////////////////////////////////////////////////////// 2245 ////////////////////////////////////////////////////////////////////////////////
2237 // content::NotificationObserver implementation. 2246 // content::NotificationObserver implementation.
2238 2247
2239 void AutofillDialogControllerImpl::Observe( 2248 void AutofillDialogControllerImpl::Observe(
2240 int type, 2249 int type,
2241 const content::NotificationSource& source, 2250 const content::NotificationSource& source,
2242 const content::NotificationDetails& details) { 2251 const content::NotificationDetails& details) {
2243 DCHECK_EQ(type, content::NOTIFICATION_NAV_ENTRY_COMMITTED); 2252 DCHECK_EQ(type, content::NOTIFICATION_NAV_ENTRY_COMMITTED);
2244 content::LoadCommittedDetails* load_details = 2253 content::LoadCommittedDetails* load_details =
2245 content::Details<content::LoadCommittedDetails>(details).ptr(); 2254 content::Details<content::LoadCommittedDetails>(details).ptr();
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
3647 view_->UpdateButtonStrip(); 3656 view_->UpdateButtonStrip();
3648 } 3657 }
3649 3658
3650 void AutofillDialogControllerImpl::FetchWalletCookie() { 3659 void AutofillDialogControllerImpl::FetchWalletCookie() {
3651 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); 3660 net::URLRequestContextGetter* request_context = profile_->GetRequestContext();
3652 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); 3661 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context));
3653 signin_helper_->StartWalletCookieValueFetch(); 3662 signin_helper_->StartWalletCookieValueFetch();
3654 } 3663 }
3655 3664
3656 } // namespace autofill 3665 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698