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 "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "components/autofill/content/browser/content_autofill_driver.h" | 8 #include "components/autofill/content/browser/content_autofill_driver.h" |
9 #include "components/autofill/core/browser/autofill_client.h" | 9 #include "components/autofill/core/browser/autofill_client.h" |
10 #include "components/autofill/core/browser/autofill_manager.h" | 10 #include "components/autofill/core/browser/autofill_manager.h" |
11 #include "components/autofill/core/browser/form_structure.h" | 11 #include "components/autofill/core/browser/form_structure.h" |
12 #include "components/autofill/core/common/autofill_switches.h" | 12 #include "components/autofill/core/common/autofill_switches.h" |
| 13 #include "content/public/browser/navigation_handle.h" |
13 #include "content/public/browser/render_frame_host.h" | 14 #include "content/public/browser/render_frame_host.h" |
14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
15 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
16 | 17 |
17 namespace autofill { | 18 namespace autofill { |
18 | 19 |
19 const char ContentAutofillDriverFactory:: | 20 const char ContentAutofillDriverFactory:: |
20 kContentAutofillDriverFactoryWebContentsUserDataKey[] = | 21 kContentAutofillDriverFactoryWebContentsUserDataKey[] = |
21 "web_contents_autofill_driver_factory"; | 22 "web_contents_autofill_driver_factory"; |
22 | 23 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 frame_driver_map_.erase(render_frame_host); | 89 frame_driver_map_.erase(render_frame_host); |
89 } | 90 } |
90 | 91 |
91 void ContentAutofillDriverFactory::DidNavigateAnyFrame( | 92 void ContentAutofillDriverFactory::DidNavigateAnyFrame( |
92 content::RenderFrameHost* render_frame_host, | 93 content::RenderFrameHost* render_frame_host, |
93 const content::LoadCommittedDetails& details, | 94 const content::LoadCommittedDetails& details, |
94 const content::FrameNavigateParams& params) { | 95 const content::FrameNavigateParams& params) { |
95 frame_driver_map_[render_frame_host]->DidNavigateFrame(details, params); | 96 frame_driver_map_[render_frame_host]->DidNavigateFrame(details, params); |
96 } | 97 } |
97 | 98 |
98 void ContentAutofillDriverFactory::NavigationEntryCommitted( | 99 void ContentAutofillDriverFactory::DidFinishNavigation( |
99 const content::LoadCommittedDetails& load_details) { | 100 content::NavigationHandle* navigation_handle) { |
100 client_->HideAutofillPopup(); | 101 if (navigation_handle->HasCommitted()) |
| 102 client_->HideAutofillPopup(); |
101 } | 103 } |
102 | 104 |
103 void ContentAutofillDriverFactory::WasHidden() { | 105 void ContentAutofillDriverFactory::WasHidden() { |
104 client_->HideAutofillPopup(); | 106 client_->HideAutofillPopup(); |
105 } | 107 } |
106 | 108 |
107 } // namespace autofill | 109 } // namespace autofill |
OLD | NEW |