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

Side by Side Diff: chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc

Issue 656663004: [android] Show saved password settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tiny-no-hide
Patch Set: Created 6 years, 2 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 "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 13 matching lines...) Expand all
24 #include "components/autofill/core/browser/password_generator.h" 24 #include "components/autofill/core/browser/password_generator.h"
25 #include "components/password_manager/core/browser/password_manager.h" 25 #include "components/password_manager/core/browser/password_manager.h"
26 #include "content/public/browser/native_web_keyboard_event.h" 26 #include "content/public/browser/native_web_keyboard_event.h"
27 #include "content/public/browser/render_view_host.h" 27 #include "content/public/browser/render_view_host.h"
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "ui/base/l10n/l10n_util.h" 29 #include "ui/base/l10n/l10n_util.h"
30 #include "ui/events/keycodes/keyboard_codes.h" 30 #include "ui/events/keycodes/keyboard_codes.h"
31 #include "ui/gfx/rect_conversions.h" 31 #include "ui/gfx/rect_conversions.h"
32 #include "ui/gfx/text_utils.h" 32 #include "ui/gfx/text_utils.h"
33 33
34 #if defined(OS_ANDROID)
35 #include "chrome/browser/android/chromium_application.h"
36 #endif
37
34 namespace autofill { 38 namespace autofill {
35 39
36 base::WeakPtr<PasswordGenerationPopupControllerImpl> 40 base::WeakPtr<PasswordGenerationPopupControllerImpl>
37 PasswordGenerationPopupControllerImpl::GetOrCreate( 41 PasswordGenerationPopupControllerImpl::GetOrCreate(
38 base::WeakPtr<PasswordGenerationPopupControllerImpl> previous, 42 base::WeakPtr<PasswordGenerationPopupControllerImpl> previous,
39 const gfx::RectF& bounds, 43 const gfx::RectF& bounds,
40 const PasswordForm& form, 44 const PasswordForm& form,
41 int max_length, 45 int max_length,
42 password_manager::PasswordManager* password_manager, 46 password_manager::PasswordManager* password_manager,
43 PasswordGenerationPopupObserver* observer, 47 PasswordGenerationPopupObserver* observer,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 delete this; 211 delete this;
208 } 212 }
209 213
210 void PasswordGenerationPopupControllerImpl::ViewDestroyed() { 214 void PasswordGenerationPopupControllerImpl::ViewDestroyed() {
211 view_ = NULL; 215 view_ = NULL;
212 216
213 Hide(); 217 Hide();
214 } 218 }
215 219
216 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { 220 void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() {
221 #if defined(OS_ANDROID)
222 chrome::android::ChromiumApplication::ShowPasswordSettings();
223 #else
217 chrome::ShowSettingsSubPage( 224 chrome::ShowSettingsSubPage(
218 chrome::FindBrowserWithWebContents(controller_common_.web_contents()), 225 chrome::FindBrowserWithWebContents(controller_common_.web_contents()),
219 chrome::kPasswordManagerSubPage); 226 chrome::kPasswordManagerSubPage);
227 #endif
220 } 228 }
221 229
222 void PasswordGenerationPopupControllerImpl::SetSelectionAtPoint( 230 void PasswordGenerationPopupControllerImpl::SetSelectionAtPoint(
223 const gfx::Point& point) { 231 const gfx::Point& point) {
224 PasswordSelected(view_->IsPointInPasswordBounds(point)); 232 PasswordSelected(view_->IsPointInPasswordBounds(point));
225 } 233 }
226 234
227 bool PasswordGenerationPopupControllerImpl::AcceptSelectedLine() { 235 bool PasswordGenerationPopupControllerImpl::AcceptSelectedLine() {
228 if (!password_selected_) 236 if (!password_selected_)
229 return false; 237 return false;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 279
272 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { 280 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() {
273 return help_text_; 281 return help_text_;
274 } 282 }
275 283
276 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { 284 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() {
277 return link_range_; 285 return link_range_;
278 } 286 }
279 287
280 } // namespace autofill 288 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/android/chromium_application.cc ('k') | chrome/browser/ui/passwords/manage_passwords_ui_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698