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

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

Issue 1151263002: Fix positioning of autofill popup on rtl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 password_manager::PasswordManagerDriver* driver, 76 password_manager::PasswordManagerDriver* driver,
77 PasswordGenerationPopupObserver* observer, 77 PasswordGenerationPopupObserver* observer,
78 content::WebContents* web_contents, 78 content::WebContents* web_contents,
79 gfx::NativeView container_view) 79 gfx::NativeView container_view)
80 : view_(NULL), 80 : view_(NULL),
81 form_(form), 81 form_(form),
82 password_manager_(password_manager), 82 password_manager_(password_manager),
83 driver_(driver), 83 driver_(driver),
84 observer_(observer), 84 observer_(observer),
85 generator_(new PasswordGenerator(max_length)), 85 generator_(new PasswordGenerator(max_length)),
86 controller_common_(bounds, container_view, web_contents), 86 // TODO(estade): use correct text direction.
Garrett Casto 2015/05/26 04:30:14 Shouldn't this just be base::i18n::GetTextDirecti
Evan Stade 2015/05/26 18:30:47 I suspect (but am not certain) you want to do the
87 controller_common_(bounds,
88 base::i18n::LEFT_TO_RIGHT,
89 container_view,
90 web_contents),
87 password_selected_(false), 91 password_selected_(false),
88 display_password_(false), 92 display_password_(false),
89 weak_ptr_factory_(this) { 93 weak_ptr_factory_(this) {
90 controller_common_.SetKeyPressCallback( 94 controller_common_.SetKeyPressCallback(
91 base::Bind(&PasswordGenerationPopupControllerImpl::HandleKeyPressEvent, 95 base::Bind(&PasswordGenerationPopupControllerImpl::HandleKeyPressEvent,
92 base::Unretained(this))); 96 base::Unretained(this)));
93 97
94 int link_id = IDS_MANAGE_PASSWORDS_LINK; 98 int link_id = IDS_MANAGE_PASSWORDS_LINK;
95 int help_text_id = IDS_PASSWORD_GENERATION_PROMPT; 99 int help_text_id = IDS_PASSWORD_GENERATION_PROMPT;
96 const ProfileSyncService* sync_service = 100 const ProfileSyncService* sync_service =
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 293
290 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { 294 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() {
291 return help_text_; 295 return help_text_;
292 } 296 }
293 297
294 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { 298 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() {
295 return link_range_; 299 return link_range_;
296 } 300 }
297 301
298 } // namespace autofill 302 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | chrome/browser/ui/autofill/popup_controller_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698