| 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 "components/autofill/content/browser/content_autofill_driver_factory.h" | 5 #include "components/autofill/content/browser/content_autofill_driver_factory.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 auto new_factory = base::WrapUnique(new ContentAutofillDriverFactory( | 48 auto new_factory = base::WrapUnique(new ContentAutofillDriverFactory( |
| 49 contents, client, app_locale, enable_download_manager)); | 49 contents, client, app_locale, enable_download_manager)); |
| 50 const std::vector<content::RenderFrameHost*> frames = | 50 const std::vector<content::RenderFrameHost*> frames = |
| 51 contents->GetAllFrames(); | 51 contents->GetAllFrames(); |
| 52 for (content::RenderFrameHost* frame : frames) { | 52 for (content::RenderFrameHost* frame : frames) { |
| 53 if (frame->IsRenderFrameLive()) | 53 if (frame->IsRenderFrameLive()) |
| 54 new_factory->RenderFrameCreated(frame); | 54 new_factory->RenderFrameCreated(frame); |
| 55 } | 55 } |
| 56 | 56 |
| 57 contents->SetUserData(kContentAutofillDriverFactoryWebContentsUserDataKey, | 57 contents->SetUserData(kContentAutofillDriverFactoryWebContentsUserDataKey, |
| 58 new_factory.release()); | 58 std::move(new_factory)); |
| 59 } | 59 } |
| 60 | 60 |
| 61 // static | 61 // static |
| 62 ContentAutofillDriverFactory* ContentAutofillDriverFactory::FromWebContents( | 62 ContentAutofillDriverFactory* ContentAutofillDriverFactory::FromWebContents( |
| 63 content::WebContents* contents) { | 63 content::WebContents* contents) { |
| 64 return static_cast<ContentAutofillDriverFactory*>(contents->GetUserData( | 64 return static_cast<ContentAutofillDriverFactory*>(contents->GetUserData( |
| 65 kContentAutofillDriverFactoryWebContentsUserDataKey)); | 65 kContentAutofillDriverFactoryWebContentsUserDataKey)); |
| 66 } | 66 } |
| 67 | 67 |
| 68 // static | 68 // static |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 NavigationFinished(); | 127 NavigationFinished(); |
| 128 DriverForFrame(navigation_handle->GetRenderFrameHost()) | 128 DriverForFrame(navigation_handle->GetRenderFrameHost()) |
| 129 ->DidNavigateFrame(navigation_handle); | 129 ->DidNavigateFrame(navigation_handle); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void ContentAutofillDriverFactory::WasHidden() { | 132 void ContentAutofillDriverFactory::WasHidden() { |
| 133 TabHidden(); | 133 TabHidden(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace autofill | 136 } // namespace autofill |
| OLD | NEW |