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

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

Issue 872713005: autofill - Keep showing form preview while card unmasking prompt is up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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
« no previous file with comments | « no previous file | components/autofill/content/common/autofill_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/autofill/content/browser/content_autofill_driver.h" 5 #include "components/autofill/content/browser/content_autofill_driver.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "components/autofill/content/common/autofill_messages.h" 9 #include "components/autofill/content/common/autofill_messages.h"
10 #include "components/autofill/core/browser/autofill_client.h" 10 #include "components/autofill/core/browser/autofill_client.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 void ContentAutofillDriver::RendererShouldPreviewFieldWithValue( 140 void ContentAutofillDriver::RendererShouldPreviewFieldWithValue(
141 const base::string16& value) { 141 const base::string16& value) {
142 if (!RendererIsAvailable()) 142 if (!RendererIsAvailable())
143 return; 143 return;
144 render_frame_host_->Send(new AutofillMsg_PreviewFieldWithValue( 144 render_frame_host_->Send(new AutofillMsg_PreviewFieldWithValue(
145 render_frame_host_->GetRoutingID(), value)); 145 render_frame_host_->GetRoutingID(), value));
146 } 146 }
147 147
148 void ContentAutofillDriver::PopupHidden() { 148 void ContentAutofillDriver::PopupHidden() {
149 if (!RendererIsAvailable()) 149 // If the unmask prompt is showing, keep showing the preview. The preview
150 return; 150 // will be cleared when the prompt closes.
151 render_frame_host_->Send( 151 if (!autofill_manager_->IsShowingUnmaskPrompt())
152 new AutofillMsg_PopupHidden(render_frame_host_->GetRoutingID())); 152 RendererShouldClearPreviewedForm();
153 } 153 }
154 154
155 bool ContentAutofillDriver::HandleMessage(const IPC::Message& message) { 155 bool ContentAutofillDriver::HandleMessage(const IPC::Message& message) {
156 bool handled = true; 156 bool handled = true;
157 IPC_BEGIN_MESSAGE_MAP(ContentAutofillDriver, message) 157 IPC_BEGIN_MESSAGE_MAP(ContentAutofillDriver, message)
158 IPC_MESSAGE_FORWARD(AutofillHostMsg_FirstUserGestureObserved, client_, 158 IPC_MESSAGE_FORWARD(AutofillHostMsg_FirstUserGestureObserved, client_,
159 AutofillClient::OnFirstUserGestureObserved) 159 AutofillClient::OnFirstUserGestureObserved)
160 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormsSeen, 160 IPC_MESSAGE_FORWARD(AutofillHostMsg_FormsSeen,
161 autofill_manager_.get(), 161 autofill_manager_.get(),
162 AutofillManager::OnFormsSeen) 162 AutofillManager::OnFormsSeen)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 autofill_manager_->Reset(); 202 autofill_manager_->Reset();
203 } 203 }
204 204
205 void ContentAutofillDriver::SetAutofillManager( 205 void ContentAutofillDriver::SetAutofillManager(
206 scoped_ptr<AutofillManager> manager) { 206 scoped_ptr<AutofillManager> manager) {
207 autofill_manager_ = manager.Pass(); 207 autofill_manager_ = manager.Pass();
208 autofill_manager_->SetExternalDelegate(&autofill_external_delegate_); 208 autofill_manager_->SetExternalDelegate(&autofill_external_delegate_);
209 } 209 }
210 210
211 } // namespace autofill 211 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/common/autofill_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698