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

Side by Side Diff: components/autofill/content/browser/autofill_driver_impl.cc

Issue 133893004: Allow deleting autofill password suggestions on Shift+Delete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deletion is working 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
vabr (Chromium) 2014/02/05 20:34:20 Do not remove these two blank lines.
5 #include "components/autofill/content/browser/autofill_driver_impl.h" 4 #include "components/autofill/content/browser/autofill_driver_impl.h"
6
7 #include "base/command_line.h" 5 #include "base/command_line.h"
8 #include "base/threading/sequenced_worker_pool.h" 6 #include "base/threading/sequenced_worker_pool.h"
9 #include "components/autofill/core/browser/autofill_external_delegate.h" 7 #include "components/autofill/core/browser/autofill_external_delegate.h"
10 #include "components/autofill/core/browser/autofill_manager.h" 8 #include "components/autofill/core/browser/autofill_manager.h"
11 #include "components/autofill/core/browser/autofill_manager_delegate.h" 9 #include "components/autofill/core/browser/autofill_manager_delegate.h"
12 #include "components/autofill/core/common/autofill_messages.h" 10 #include "components/autofill/core/common/autofill_messages.h"
13 #include "components/autofill/core/browser/form_structure.h" 11 #include "components/autofill/core/browser/form_structure.h"
14 #include "components/autofill/core/common/autofill_switches.h" 12 #include "components/autofill/core/common/autofill_switches.h"
15 #include "content/public/browser/browser_context.h" 13 #include "content/public/browser/browser_context.h"
16 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 if (!host) 122 if (!host)
125 return; 123 return;
126 124
127 std::vector<FormDataPredictions> type_predictions; 125 std::vector<FormDataPredictions> type_predictions;
128 FormStructure::GetFieldTypePredictions(forms, &type_predictions); 126 FormStructure::GetFieldTypePredictions(forms, &type_predictions);
129 host->Send( 127 host->Send(
130 new AutofillMsg_FieldTypePredictionsAvailable(host->GetRoutingID(), 128 new AutofillMsg_FieldTypePredictionsAvailable(host->GetRoutingID(),
131 type_predictions)); 129 type_predictions));
132 } 130 }
133 131
132 void AutofillDriverImpl::RemovePasswordAutofillSuggestion(
133 const PasswordForm& password_form) {
134 if (!RendererIsAvailable())
135 return;
136 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
137 host->Send(new AutofillMsg_RemovePasswordSuggestion(host->GetRoutingID(),
138 password_form));
139 }
140
134 void AutofillDriverImpl::RendererShouldAcceptDataListSuggestion( 141 void AutofillDriverImpl::RendererShouldAcceptDataListSuggestion(
135 const base::string16& value) { 142 const base::string16& value) {
136 if (!RendererIsAvailable()) 143 if (!RendererIsAvailable())
137 return; 144 return;
138 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); 145 content::RenderViewHost* host = web_contents()->GetRenderViewHost();
139 host->Send(new AutofillMsg_AcceptDataListSuggestion(host->GetRoutingID(), 146 host->Send(new AutofillMsg_AcceptDataListSuggestion(host->GetRoutingID(),
140 value)); 147 value));
141 } 148 }
142 149
143 void AutofillDriverImpl::RendererShouldAcceptPasswordAutofillSuggestion( 150 void AutofillDriverImpl::RendererShouldAcceptPasswordAutofillSuggestion(
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 void AutofillDriverImpl::NavigationEntryCommitted( 241 void AutofillDriverImpl::NavigationEntryCommitted(
235 const content::LoadCommittedDetails& load_details) { 242 const content::LoadCommittedDetails& load_details) {
236 autofill_manager_->delegate()->HideAutofillPopup(); 243 autofill_manager_->delegate()->HideAutofillPopup();
237 } 244 }
238 245
239 void AutofillDriverImpl::WasHidden() { 246 void AutofillDriverImpl::WasHidden() {
240 autofill_manager_->delegate()->HideAutofillPopup(); 247 autofill_manager_->delegate()->HideAutofillPopup();
241 } 248 }
242 249
243 } // namespace autofill 250 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698