| OLD | NEW |
| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 gfx::Point transformed_point; | 163 gfx::Point transformed_point; |
| 164 transformed_point = | 164 transformed_point = |
| 165 render_frame_host_->GetView()->TransformPointToRootCoordSpace(orig_point); | 165 render_frame_host_->GetView()->TransformPointToRootCoordSpace(orig_point); |
| 166 | 166 |
| 167 gfx::RectF new_box; | 167 gfx::RectF new_box; |
| 168 new_box.SetRect(transformed_point.x(), transformed_point.y(), | 168 new_box.SetRect(transformed_point.x(), transformed_point.y(), |
| 169 bounding_box.width(), bounding_box.height()); | 169 bounding_box.width(), bounding_box.height()); |
| 170 return new_box; | 170 return new_box; |
| 171 } | 171 } |
| 172 | 172 |
| 173 void ContentAutofillDriver::DidInteractWithCreditCardForm() { |
| 174 // Notify the WebContents about credit card inputs on HTTP pages. |
| 175 content::WebContents* contents = |
| 176 content::WebContents::FromRenderFrameHost(render_frame_host_); |
| 177 if (contents->GetVisibleURL().SchemeIsCryptographic()) |
| 178 return; |
| 179 contents->OnCreditCardInputShownOnHttp(); |
| 180 } |
| 181 |
| 173 // mojom::AutofillDriver: | 182 // mojom::AutofillDriver: |
| 174 void ContentAutofillDriver::FirstUserGestureObserved() { | 183 void ContentAutofillDriver::FirstUserGestureObserved() { |
| 175 client_->OnFirstUserGestureObserved(); | 184 client_->OnFirstUserGestureObserved(); |
| 176 } | 185 } |
| 177 | 186 |
| 178 void ContentAutofillDriver::FormsSeen(const std::vector<FormData>& forms, | 187 void ContentAutofillDriver::FormsSeen(const std::vector<FormData>& forms, |
| 179 base::TimeTicks timestamp) { | 188 base::TimeTicks timestamp) { |
| 180 autofill_manager_->OnFormsSeen(forms, timestamp); | 189 autofill_manager_->OnFormsSeen(forms, timestamp); |
| 181 } | 190 } |
| 182 | 191 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // Here is a lazy binding, and will not reconnect after connection error. | 264 // Here is a lazy binding, and will not reconnect after connection error. |
| 256 if (!autofill_agent_) { | 265 if (!autofill_agent_) { |
| 257 render_frame_host_->GetRemoteInterfaces()->GetInterface( | 266 render_frame_host_->GetRemoteInterfaces()->GetInterface( |
| 258 mojo::GetProxy(&autofill_agent_)); | 267 mojo::GetProxy(&autofill_agent_)); |
| 259 } | 268 } |
| 260 | 269 |
| 261 return autofill_agent_; | 270 return autofill_agent_; |
| 262 } | 271 } |
| 263 | 272 |
| 264 } // namespace autofill | 273 } // namespace autofill |
| OLD | NEW |