| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 void ChromeAutofillClient::OnFirstUserGestureObserved() { | 341 void ChromeAutofillClient::OnFirstUserGestureObserved() { |
| 342 ContentAutofillDriverFactory* factory = | 342 ContentAutofillDriverFactory* factory = |
| 343 ContentAutofillDriverFactory::FromWebContents(web_contents()); | 343 ContentAutofillDriverFactory::FromWebContents(web_contents()); |
| 344 DCHECK(factory); | 344 DCHECK(factory); |
| 345 | 345 |
| 346 for (content::RenderFrameHost* frame : web_contents()->GetAllFrames()) { | 346 for (content::RenderFrameHost* frame : web_contents()->GetAllFrames()) { |
| 347 // No need to notify non-live frames. | 347 // No need to notify non-live frames. |
| 348 // And actually they have no corresponding drivers in the factory's map. | 348 // And actually they have no corresponding drivers in the factory's map. |
| 349 if (!frame->IsRenderFrameLive()) | 349 if (!frame->IsRenderFrameLive()) |
| 350 continue; | 350 continue; |
| 351 ContentAutofillDriver* driver = factory->DriverForFrame(frame); | 351 ContentAutofillDriver* driver = |
| 352 static_cast<ContentAutofillDriver*>(factory->DriverForFrame(frame)); |
| 352 DCHECK(driver); | 353 DCHECK(driver); |
| 353 driver->NotifyFirstUserGestureObservedInTab(); | 354 driver->NotifyFirstUserGestureObservedInTab(); |
| 354 } | 355 } |
| 355 } | 356 } |
| 356 | 357 |
| 357 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { | 358 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { |
| 358 content::SSLStatus ssl_status; | 359 content::SSLStatus ssl_status; |
| 359 content::NavigationEntry* navigation_entry = | 360 content::NavigationEntry* navigation_entry = |
| 360 web_contents()->GetController().GetLastCommittedEntry(); | 361 web_contents()->GetController().GetLastCommittedEntry(); |
| 361 if (!navigation_entry) | 362 if (!navigation_entry) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 401 } |
| 401 | 402 |
| 402 void ChromeAutofillClient::ShowHttpNotSecureExplanation() { | 403 void ChromeAutofillClient::ShowHttpNotSecureExplanation() { |
| 403 web_contents()->OpenURL(content::OpenURLParams( | 404 web_contents()->OpenURL(content::OpenURLParams( |
| 404 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), | 405 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), |
| 405 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, | 406 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, |
| 406 false /* is_renderer_initiated */)); | 407 false /* is_renderer_initiated */)); |
| 407 } | 408 } |
| 408 | 409 |
| 409 } // namespace autofill | 410 } // namespace autofill |
| OLD | NEW |