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 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "components/strings/grit/components_strings.h" | 28 #include "components/strings/grit/components_strings.h" |
29 #include "content/public/browser/native_web_keyboard_event.h" | 29 #include "content/public/browser/native_web_keyboard_event.h" |
30 #include "content/public/browser/render_view_host.h" | 30 #include "content/public/browser/render_view_host.h" |
31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
33 #include "ui/events/keycodes/keyboard_codes.h" | 33 #include "ui/events/keycodes/keyboard_codes.h" |
34 #include "ui/gfx/geometry/rect_conversions.h" | 34 #include "ui/gfx/geometry/rect_conversions.h" |
35 #include "ui/gfx/text_utils.h" | 35 #include "ui/gfx/text_utils.h" |
36 | 36 |
37 #if defined(OS_ANDROID) | 37 #if defined(OS_ANDROID) |
38 #include "chrome/browser/android/chrome_application.h" | 38 #include "chrome/browser/android/preferences/preferences_launcher.h" |
39 #endif | 39 #endif |
40 | 40 |
41 namespace autofill { | 41 namespace autofill { |
42 | 42 |
43 base::WeakPtr<PasswordGenerationPopupControllerImpl> | 43 base::WeakPtr<PasswordGenerationPopupControllerImpl> |
44 PasswordGenerationPopupControllerImpl::GetOrCreate( | 44 PasswordGenerationPopupControllerImpl::GetOrCreate( |
45 base::WeakPtr<PasswordGenerationPopupControllerImpl> previous, | 45 base::WeakPtr<PasswordGenerationPopupControllerImpl> previous, |
46 const gfx::RectF& bounds, | 46 const gfx::RectF& bounds, |
47 const PasswordForm& form, | 47 const PasswordForm& form, |
48 int max_length, | 48 int max_length, |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 } | 219 } |
220 | 220 |
221 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { | 221 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { |
222 view_ = NULL; | 222 view_ = NULL; |
223 | 223 |
224 Hide(); | 224 Hide(); |
225 } | 225 } |
226 | 226 |
227 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { | 227 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { |
228 #if defined(OS_ANDROID) | 228 #if defined(OS_ANDROID) |
229 chrome::android::ChromeApplication::ShowPasswordSettings(); | 229 chrome::android::PreferencesLauncher::ShowPasswordSettings(); |
230 #else | 230 #else |
231 chrome::NavigateParams params( | 231 chrome::NavigateParams params( |
232 chrome::FindBrowserWithWebContents(web_contents()), | 232 chrome::FindBrowserWithWebContents(web_contents()), |
233 GURL(password_manager::kPasswordManagerAccountDashboardURL), | 233 GURL(password_manager::kPasswordManagerAccountDashboardURL), |
234 ui::PAGE_TRANSITION_LINK); | 234 ui::PAGE_TRANSITION_LINK); |
235 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; | 235 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
236 chrome::Navigate(¶ms); | 236 chrome::Navigate(¶ms); |
237 #endif | 237 #endif |
238 } | 238 } |
239 | 239 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { | 305 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { |
306 return help_text_; | 306 return help_text_; |
307 } | 307 } |
308 | 308 |
309 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { | 309 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { |
310 return link_range_; | 310 return link_range_; |
311 } | 311 } |
312 | 312 |
313 } // namespace autofill | 313 } // namespace autofill |
OLD | NEW |