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

Side by Side Diff: views/controls/menu/menu.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « views/controls/label_unittest.cc ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « views/controls/label_unittest.cc ('k') | views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698