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 15 matching lines...) Expand all Loading... |
26 #include "components/password_manager/core/browser/password_bubble_experiment.h" | 26 #include "components/password_manager/core/browser/password_bubble_experiment.h" |
27 #include "components/password_manager/core/browser/password_manager.h" | 27 #include "components/password_manager/core/browser/password_manager.h" |
28 #include "content/public/browser/native_web_keyboard_event.h" | 28 #include "content/public/browser/native_web_keyboard_event.h" |
29 #include "content/public/browser/render_view_host.h" | 29 #include "content/public/browser/render_view_host.h" |
30 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 #include "ui/events/keycodes/keyboard_codes.h" | 32 #include "ui/events/keycodes/keyboard_codes.h" |
33 #include "ui/gfx/geometry/rect_conversions.h" | 33 #include "ui/gfx/geometry/rect_conversions.h" |
34 #include "ui/gfx/text_utils.h" | 34 #include "ui/gfx/text_utils.h" |
35 | 35 |
36 #if BUILDFLAG(ANDROID_JAVA_UI) | 36 #if defined(OS_ANDROID) |
37 #include "chrome/browser/android/chrome_application.h" | 37 #include "chrome/browser/android/chrome_application.h" |
38 #endif | 38 #endif |
39 | 39 |
40 namespace autofill { | 40 namespace autofill { |
41 | 41 |
42 base::WeakPtr<PasswordGenerationPopupControllerImpl> | 42 base::WeakPtr<PasswordGenerationPopupControllerImpl> |
43 PasswordGenerationPopupControllerImpl::GetOrCreate( | 43 PasswordGenerationPopupControllerImpl::GetOrCreate( |
44 base::WeakPtr<PasswordGenerationPopupControllerImpl> previous, | 44 base::WeakPtr<PasswordGenerationPopupControllerImpl> previous, |
45 const gfx::RectF& bounds, | 45 const gfx::RectF& bounds, |
46 const PasswordForm& form, | 46 const PasswordForm& form, |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 delete this; | 216 delete this; |
217 } | 217 } |
218 | 218 |
219 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { | 219 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { |
220 view_ = NULL; | 220 view_ = NULL; |
221 | 221 |
222 Hide(); | 222 Hide(); |
223 } | 223 } |
224 | 224 |
225 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { | 225 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { |
226 #if BUILDFLAG(ANDROID_JAVA_UI) | 226 #if defined(OS_ANDROID) |
227 chrome::android::ChromeApplication::ShowPasswordSettings(); | 227 chrome::android::ChromeApplication::ShowPasswordSettings(); |
228 #else | 228 #else |
229 chrome::ShowSettingsSubPage( | 229 chrome::ShowSettingsSubPage( |
230 chrome::FindBrowserWithWebContents(controller_common_.web_contents()), | 230 chrome::FindBrowserWithWebContents(controller_common_.web_contents()), |
231 chrome::kPasswordManagerSubPage); | 231 chrome::kPasswordManagerSubPage); |
232 #endif | 232 #endif |
233 } | 233 } |
234 | 234 |
235 void PasswordGenerationPopupControllerImpl::SetSelectionAtPoint( | 235 void PasswordGenerationPopupControllerImpl::SetSelectionAtPoint( |
236 const gfx::Point& point) { | 236 const gfx::Point& point) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 301 |
302 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { | 302 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { |
303 return help_text_; | 303 return help_text_; |
304 } | 304 } |
305 | 305 |
306 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { | 306 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { |
307 return link_range_; | 307 return link_range_; |
308 } | 308 } |
309 | 309 |
310 } // namespace autofill | 310 } // namespace autofill |
OLD | NEW |