| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "views/controls/menu/menu.h" | 5 #include "views/controls/menu/menu.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| 11 | 11 |
| 12 bool Menu::Delegate::IsRightToLeftUILayout() const { | 12 bool Menu::Delegate::IsRightToLeftUILayout() const { |
| 13 return l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT; | 13 return base::i18n::IsRTL(); |
| 14 } | 14 } |
| 15 | 15 |
| 16 const SkBitmap& Menu::Delegate::GetEmptyIcon() const { | 16 const SkBitmap& Menu::Delegate::GetEmptyIcon() const { |
| 17 static const SkBitmap* empty_icon = new SkBitmap(); | 17 static const SkBitmap* empty_icon = new SkBitmap(); |
| 18 return *empty_icon; | 18 return *empty_icon; |
| 19 } | 19 } |
| 20 | 20 |
| 21 Menu::Menu(Delegate* delegate, AnchorPoint anchor) | 21 Menu::Menu(Delegate* delegate, AnchorPoint anchor) |
| 22 : delegate_(delegate), | 22 : delegate_(delegate), |
| 23 anchor_(anchor) { | 23 anchor_(anchor) { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 int item_id, | 92 int item_id, |
| 93 const std::wstring& label, | 93 const std::wstring& label, |
| 94 const SkBitmap& icon) { | 94 const SkBitmap& icon) { |
| 95 AddMenuItemInternal(index, item_id, label, icon, Menu::NORMAL); | 95 AddMenuItemInternal(index, item_id, label, icon, Menu::NORMAL); |
| 96 } | 96 } |
| 97 | 97 |
| 98 Menu::Menu() : delegate_(NULL), anchor_(TOPLEFT) { | 98 Menu::Menu() : delegate_(NULL), anchor_(TOPLEFT) { |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace views | 101 } // namespace views |
| OLD | NEW |