| OLD | NEW |
| 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 "components/autofill/ios/browser/autofill_driver_ios.h" | 5 #include "components/autofill/ios/browser/autofill_driver_ios.h" |
| 6 | 6 |
| 7 #include "components/autofill/ios/browser/autofill_driver_ios_bridge.h" | 7 #include "components/autofill/ios/browser/autofill_driver_ios_bridge.h" |
| 8 #include "ios/web/public/browser_state.h" | 8 #include "ios/web/public/browser_state.h" |
| 9 #import "ios/web/public/origin_util.h" |
| 9 #include "ios/web/public/web_state/web_state.h" | 10 #include "ios/web/public/web_state/web_state.h" |
| 10 #include "ios/web/public/web_thread.h" | 11 #include "ios/web/public/web_thread.h" |
| 11 #include "ui/gfx/geometry/rect_f.h" | 12 #include "ui/gfx/geometry/rect_f.h" |
| 12 | 13 |
| 13 DEFINE_WEB_STATE_USER_DATA_KEY(autofill::AutofillDriverIOS); | 14 DEFINE_WEB_STATE_USER_DATA_KEY(autofill::AutofillDriverIOS); |
| 14 | 15 |
| 15 namespace autofill { | 16 namespace autofill { |
| 16 | 17 |
| 17 // static | 18 // static |
| 18 void AutofillDriverIOS::CreateForWebStateAndDelegate( | 19 void AutofillDriverIOS::CreateForWebStateAndDelegate( |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 76 |
| 76 void AutofillDriverIOS::SendAutofillTypePredictionsToRenderer( | 77 void AutofillDriverIOS::SendAutofillTypePredictionsToRenderer( |
| 77 const std::vector<FormStructure*>& forms) { | 78 const std::vector<FormStructure*>& forms) { |
| 78 [bridge_ sendAutofillTypePredictionsToRenderer:forms]; | 79 [bridge_ sendAutofillTypePredictionsToRenderer:forms]; |
| 79 } | 80 } |
| 80 | 81 |
| 81 void AutofillDriverIOS::RendererShouldAcceptDataListSuggestion( | 82 void AutofillDriverIOS::RendererShouldAcceptDataListSuggestion( |
| 82 const base::string16& value) { | 83 const base::string16& value) { |
| 83 } | 84 } |
| 84 | 85 |
| 85 void AutofillDriverIOS::DidInteractWithCreditCardForm() {} | 86 void AutofillDriverIOS::DidInteractWithCreditCardForm() { |
| 87 if (!web::IsOriginSecure(web_state_->GetLastCommittedURL())) |
| 88 web_state_->OnCreditCardInputShownOnHttp(); |
| 89 } |
| 86 | 90 |
| 87 void AutofillDriverIOS::RendererShouldClearFilledForm() { | 91 void AutofillDriverIOS::RendererShouldClearFilledForm() { |
| 88 } | 92 } |
| 89 | 93 |
| 90 void AutofillDriverIOS::RendererShouldClearPreviewedForm() { | 94 void AutofillDriverIOS::RendererShouldClearPreviewedForm() { |
| 91 } | 95 } |
| 92 | 96 |
| 93 void AutofillDriverIOS::RendererShouldFillFieldWithValue( | 97 void AutofillDriverIOS::RendererShouldFillFieldWithValue( |
| 94 const base::string16& value) { | 98 const base::string16& value) { |
| 95 } | 99 } |
| 96 | 100 |
| 97 void AutofillDriverIOS::RendererShouldPreviewFieldWithValue( | 101 void AutofillDriverIOS::RendererShouldPreviewFieldWithValue( |
| 98 const base::string16& value) { | 102 const base::string16& value) { |
| 99 } | 103 } |
| 100 | 104 |
| 101 void AutofillDriverIOS::PopupHidden() { | 105 void AutofillDriverIOS::PopupHidden() { |
| 102 } | 106 } |
| 103 | 107 |
| 104 gfx::RectF AutofillDriverIOS::TransformBoundingBoxToViewportCoordinates( | 108 gfx::RectF AutofillDriverIOS::TransformBoundingBoxToViewportCoordinates( |
| 105 const gfx::RectF& bounding_box) { | 109 const gfx::RectF& bounding_box) { |
| 106 return bounding_box; | 110 return bounding_box; |
| 107 } | 111 } |
| 108 | 112 |
| 109 } // namespace autofill | 113 } // namespace autofill |
| OLD | NEW |