| 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 "android_webview/native/aw_autofill_client.h" | 5 #include "android_webview/native/aw_autofill_client.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
| 8 #include "android_webview/browser/aw_content_browser_client.h" | 8 #include "android_webview/browser/aw_content_browser_client.h" |
| 9 #include "android_webview/browser/aw_form_database_service.h" | 9 #include "android_webview/browser/aw_form_database_service.h" |
| 10 #include "android_webview/browser/aw_pref_store.h" | 10 #include "android_webview/browser/aw_pref_store.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 content::SSLStatus ssl_status; | 185 content::SSLStatus ssl_status; |
| 186 content::NavigationEntry* navigation_entry = | 186 content::NavigationEntry* navigation_entry = |
| 187 web_contents_->GetController().GetLastCommittedEntry(); | 187 web_contents_->GetController().GetLastCommittedEntry(); |
| 188 if (!navigation_entry) | 188 if (!navigation_entry) |
| 189 return false; | 189 return false; |
| 190 | 190 |
| 191 ssl_status = navigation_entry->GetSSL(); | 191 ssl_status = navigation_entry->GetSSL(); |
| 192 // Note: The implementation below is a copy of the one in | 192 // Note: The implementation below is a copy of the one in |
| 193 // ChromeAutofillClient::IsContextSecure, and should be kept in sync | 193 // ChromeAutofillClient::IsContextSecure, and should be kept in sync |
| 194 // until crbug.com/505388 gets implemented. | 194 // until crbug.com/505388 gets implemented. |
| 195 return ssl_status.security_style == | 195 return ssl_status.security_style == content::SECURITY_STYLE_AUTHENTICATED && |
| 196 content::SECURITY_STYLE_AUTHENTICATED && | 196 !(ssl_status.content_status & |
| 197 ssl_status.content_status == content::SSLStatus::NORMAL_CONTENT; | 197 content::SSLStatus::RAN_INSECURE_CONTENT); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void AwAutofillClient::SuggestionSelected(JNIEnv* env, | 200 void AwAutofillClient::SuggestionSelected(JNIEnv* env, |
| 201 const JavaParamRef<jobject>& object, | 201 const JavaParamRef<jobject>& object, |
| 202 jint position) { | 202 jint position) { |
| 203 if (delegate_) { | 203 if (delegate_) { |
| 204 delegate_->DidAcceptSuggestion(suggestions_[position].value, | 204 delegate_->DidAcceptSuggestion(suggestions_[position].value, |
| 205 suggestions_[position].frontend_id, | 205 suggestions_[position].frontend_id, |
| 206 position); | 206 position); |
| 207 } | 207 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 content::RenderFrameHost* rfh, | 256 content::RenderFrameHost* rfh, |
| 257 const ResultCallback& callback) { | 257 const ResultCallback& callback) { |
| 258 NOTIMPLEMENTED(); | 258 NOTIMPLEMENTED(); |
| 259 } | 259 } |
| 260 | 260 |
| 261 bool RegisterAwAutofillClient(JNIEnv* env) { | 261 bool RegisterAwAutofillClient(JNIEnv* env) { |
| 262 return RegisterNativesImpl(env); | 262 return RegisterNativesImpl(env); |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace android_webview | 265 } // namespace android_webview |
| OLD | NEW |