| 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 "chrome/browser/ui/autofill/chrome_autofill_client.h" | 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 AutofillLoggerAndroid::DidFillOrPreviewField(autofilled_value, | 289 AutofillLoggerAndroid::DidFillOrPreviewField(autofilled_value, |
| 290 profile_full_name); | 290 profile_full_name); |
| 291 #endif // defined(OS_ANDROID) | 291 #endif // defined(OS_ANDROID) |
| 292 } | 292 } |
| 293 | 293 |
| 294 void ChromeAutofillClient::OnFirstUserGestureObserved() { | 294 void ChromeAutofillClient::OnFirstUserGestureObserved() { |
| 295 web_contents()->SendToAllFrames( | 295 web_contents()->SendToAllFrames( |
| 296 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); | 296 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void ChromeAutofillClient::LinkClicked(const GURL& url, | |
| 300 WindowOpenDisposition disposition) { | |
| 301 web_contents()->OpenURL(content::OpenURLParams( | |
| 302 url, content::Referrer(), disposition, ui::PAGE_TRANSITION_LINK, false)); | |
| 303 } | |
| 304 | |
| 305 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { | 299 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { |
| 306 content::SSLStatus ssl_status; | 300 content::SSLStatus ssl_status; |
| 307 content::NavigationEntry* navigation_entry = | 301 content::NavigationEntry* navigation_entry = |
| 308 web_contents()->GetController().GetLastCommittedEntry(); | 302 web_contents()->GetController().GetLastCommittedEntry(); |
| 309 if (!navigation_entry) | 303 if (!navigation_entry) |
| 310 return false; | 304 return false; |
| 311 | 305 |
| 312 ssl_status = navigation_entry->GetSSL(); | 306 ssl_status = navigation_entry->GetSSL(); |
| 313 // Note: If changing the implementation below, also change | 307 // Note: If changing the implementation below, also change |
| 314 // AwAutofillClient::IsContextSecure. See crbug.com/505388 | 308 // AwAutofillClient::IsContextSecure. See crbug.com/505388 |
| 315 return ssl_status.security_style == | 309 return ssl_status.security_style == |
| 316 content::SECURITY_STYLE_AUTHENTICATED && | 310 content::SECURITY_STYLE_AUTHENTICATED && |
| 317 ssl_status.content_status == content::SSLStatus::NORMAL_CONTENT; | 311 ssl_status.content_status == content::SSLStatus::NORMAL_CONTENT; |
| 318 } | 312 } |
| 319 | 313 |
| 320 } // namespace autofill | 314 } // namespace autofill |
| OLD | NEW |