Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: components/autofill/content/browser/content_autofill_driver_factory.cc

Issue 2672243002: Convert ContentAutofillDriverFactory to use the new navigation callbacks. (Closed)
Patch Set: review comment Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698