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/password_generation_popup_controller_impl.h
" | 5 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 delete this; | 206 delete this; |
207 } | 207 } |
208 | 208 |
209 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { | 209 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { |
210 view_ = NULL; | 210 view_ = NULL; |
211 | 211 |
212 Hide(); | 212 Hide(); |
213 } | 213 } |
214 | 214 |
215 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { | 215 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { |
216 // TODO(gcasto): Change this to navigate to account central once passwords | |
217 // are visible there. | |
218 Browser* browser = | 216 Browser* browser = |
219 chrome::FindBrowserWithWebContents(controller_common_.web_contents()); | 217 chrome::FindBrowserWithWebContents(controller_common_.web_contents()); |
220 content::OpenURLParams params( | 218 content::OpenURLParams params( |
221 GURL(chrome::kAutoPasswordGenerationLearnMoreURL), content::Referrer(), | 219 GURL(chrome::kPasswordManagerAccountDashboardURL), content::Referrer(), |
222 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false); | 220 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false); |
223 browser->OpenURL(params); | 221 browser->OpenURL(params); |
224 } | 222 } |
225 | 223 |
226 void PasswordGenerationPopupControllerImpl::SetSelectionAtPoint( | 224 void PasswordGenerationPopupControllerImpl::SetSelectionAtPoint( |
227 const gfx::Point& point) { | 225 const gfx::Point& point) { |
228 PasswordSelected(view_->IsPointInPasswordBounds(point)); | 226 PasswordSelected(view_->IsPointInPasswordBounds(point)); |
229 } | 227 } |
230 | 228 |
231 bool PasswordGenerationPopupControllerImpl::AcceptSelectedLine() { | 229 bool PasswordGenerationPopupControllerImpl::AcceptSelectedLine() { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 264 |
267 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { | 265 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { |
268 return help_text_; | 266 return help_text_; |
269 } | 267 } |
270 | 268 |
271 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { | 269 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { |
272 return link_range_; | 270 return link_range_; |
273 } | 271 } |
274 | 272 |
275 } // namespace autofill | 273 } // namespace autofill |
OLD | NEW |