OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "android_webview/browser/aw_autofill_external_delegate.h" |
| 6 |
| 7 #include "android_webview/browser/aw_autofill_manager_delegate.h" |
| 8 #include "components/autofill/browser/autofill_manager.h" |
| 9 #include "content/public/browser/web_contents.h" |
| 10 |
| 11 using autofill::AutofillManager; |
| 12 |
| 13 namespace android_webview { |
| 14 |
| 15 void AwAutofillExternalDelegate::CreateForWebContentsAndManager( |
| 16 content::WebContents* web_contents, |
| 17 AutofillManager* autofill_manager) { |
| 18 DCHECK(web_contents); |
| 19 if (FromWebContents(web_contents)) |
| 20 return; |
| 21 |
| 22 web_contents->SetUserData( |
| 23 UserDataKey(), |
| 24 new AwAutofillExternalDelegate(web_contents, autofill_manager)); |
| 25 } |
| 26 |
| 27 AwAutofillExternalDelegate::AwAutofillExternalDelegate( |
| 28 content::WebContents* web_contents, |
| 29 AutofillManager* autofill_manager) |
| 30 : autofill::AutofillExternalDelegate(web_contents, autofill_manager) { |
| 31 } |
| 32 |
| 33 AwAutofillExternalDelegate::~AwAutofillExternalDelegate() {} |
| 34 |
| 35 bool AwAutofillExternalDelegate::ShouldIgnoreFormData() { |
| 36 return !AwAutofillManagerDelegate::FromWebContents(web_contents())-> |
| 37 GetSaveFormData(); |
| 38 } |
| 39 |
| 40 } // namespace autofill |
OLD | NEW |