| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 insertion_result.first->second = base::MakeUnique<ContentAutofillDriver>( | 103 insertion_result.first->second = base::MakeUnique<ContentAutofillDriver>( |
| 104 render_frame_host, client_, app_locale_, enable_download_manager_); | 104 render_frame_host, client_, app_locale_, enable_download_manager_); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 void ContentAutofillDriverFactory::RenderFrameDeleted( | 108 void ContentAutofillDriverFactory::RenderFrameDeleted( |
| 109 content::RenderFrameHost* render_frame_host) { | 109 content::RenderFrameHost* render_frame_host) { |
| 110 frame_driver_map_.erase(render_frame_host); | 110 frame_driver_map_.erase(render_frame_host); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void ContentAutofillDriverFactory::DidNavigateAnyFrame( | |
| 114 content::RenderFrameHost* render_frame_host, | |
| 115 const content::LoadCommittedDetails& details, | |
| 116 const content::FrameNavigateParams& params) { | |
| 117 frame_driver_map_[render_frame_host]->DidNavigateFrame(details, params); | |
| 118 } | |
| 119 | |
| 120 void ContentAutofillDriverFactory::DidFinishNavigation( | 113 void ContentAutofillDriverFactory::DidFinishNavigation( |
| 121 content::NavigationHandle* navigation_handle) { | 114 content::NavigationHandle* navigation_handle) { |
| 122 if (navigation_handle->HasCommitted()) | 115 if (!navigation_handle->HasCommitted()) |
| 123 client_->HideAutofillPopup(); | 116 return; |
| 117 |
| 118 client_->HideAutofillPopup(); |
| 119 frame_driver_map_[navigation_handle->GetRenderFrameHost()]-> |
| 120 DidNavigateFrame(navigation_handle); |
| 124 } | 121 } |
| 125 | 122 |
| 126 void ContentAutofillDriverFactory::WasHidden() { | 123 void ContentAutofillDriverFactory::WasHidden() { |
| 127 client_->HideAutofillPopup(); | 124 client_->HideAutofillPopup(); |
| 128 } | 125 } |
| 129 | 126 |
| 130 } // namespace autofill | 127 } // namespace autofill |
| OLD | NEW |