Chromium Code Reviews| Index: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| index b4fcaf7b7d469cbd561849e1de3c7411c1115446..75a9bece17682d953a1abd71d39b43df81eca02a 100644 |
| --- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| +++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
| @@ -72,7 +72,8 @@ WeakPtr<AutofillPopupControllerImpl> AutofillPopupControllerImpl::GetOrCreate( |
| WeakPtr<AutofillPopupControllerImpl> previous, |
| WeakPtr<AutofillPopupDelegate> delegate, |
| gfx::NativeView container_view, |
| - const gfx::RectF& element_bounds) { |
| + const gfx::RectF& element_bounds, |
| + base::i18n::TextDirection text_direction) { |
| DCHECK(!previous.get() || previous->delegate_.get() == delegate.get()); |
| if (previous.get() && previous->container_view() == container_view && |
| @@ -85,18 +86,21 @@ WeakPtr<AutofillPopupControllerImpl> AutofillPopupControllerImpl::GetOrCreate( |
| previous->Hide(); |
| AutofillPopupControllerImpl* controller = |
| - new AutofillPopupControllerImpl(delegate, container_view, element_bounds); |
| + new AutofillPopupControllerImpl( |
| + delegate, container_view, element_bounds, text_direction); |
| return controller->GetWeakPtr(); |
| } |
| AutofillPopupControllerImpl::AutofillPopupControllerImpl( |
| base::WeakPtr<AutofillPopupDelegate> delegate, |
| gfx::NativeView container_view, |
| - const gfx::RectF& element_bounds) |
| + const gfx::RectF& element_bounds, |
| + base::i18n::TextDirection text_direction) |
| : view_(NULL), |
| delegate_(delegate), |
| container_view_(container_view), |
| element_bounds_(element_bounds), |
| + text_direction_(text_direction), |
| weak_ptr_factory_(this) { |
| ClearState(); |
| #if !defined(OS_ANDROID) |
| @@ -296,6 +300,10 @@ const gfx::RectF& AutofillPopupControllerImpl::element_bounds() const { |
| return element_bounds_; |
| } |
| +bool AutofillPopupControllerImpl::is_rtl() const { |
|
Ilya Sherman
2013/06/06 21:20:47
nit: This method should now probably be named IsRT
csharp
2013/06/07 15:22:06
Done.
|
| + return text_direction_ == base::i18n::RIGHT_TO_LEFT; |
| +} |
| + |
| const std::vector<string16>& AutofillPopupControllerImpl::names() const { |
| return names_; |
| } |