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/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "components/password_manager/core/browser/password_bubble_experiment.h" | 27 #include "components/password_manager/core/browser/password_bubble_experiment.h" |
28 #include "components/password_manager/core/browser/password_manager.h" | 28 #include "components/password_manager/core/browser/password_manager.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) && !defined(USE_AURA) |
38 #include "chrome/browser/android/chrome_application.h" | 38 #include "chrome/browser/android/chrome_application.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, |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 delete this; | 225 delete this; |
226 } | 226 } |
227 | 227 |
228 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { | 228 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { |
229 view_ = NULL; | 229 view_ = NULL; |
230 | 230 |
231 Hide(); | 231 Hide(); |
232 } | 232 } |
233 | 233 |
234 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { | 234 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { |
235 #if defined(OS_ANDROID) | 235 #if defined(OS_ANDROID) && !defined(USE_AURA) |
236 chrome::android::ChromeApplication::ShowPasswordSettings(); | 236 chrome::android::ChromeApplication::ShowPasswordSettings(); |
237 #else | 237 #else |
238 chrome::ShowSettingsSubPage( | 238 chrome::ShowSettingsSubPage( |
239 chrome::FindBrowserWithWebContents(controller_common_.web_contents()), | 239 chrome::FindBrowserWithWebContents(controller_common_.web_contents()), |
240 chrome::kPasswordManagerSubPage); | 240 chrome::kPasswordManagerSubPage); |
241 #endif | 241 #endif |
242 } | 242 } |
243 | 243 |
244 void PasswordGenerationPopupControllerImpl::SetSelectionAtPoint( | 244 void PasswordGenerationPopupControllerImpl::SetSelectionAtPoint( |
245 const gfx::Point& point) { | 245 const gfx::Point& point) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { | 294 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { |
295 return help_text_; | 295 return help_text_; |
296 } | 296 } |
297 | 297 |
298 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { | 298 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { |
299 return link_range_; | 299 return link_range_; |
300 } | 300 } |
301 | 301 |
302 } // namespace autofill | 302 } // namespace autofill |
OLD | NEW |