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

Side by Side Diff: base/i18n/rtl.h

Issue 6894009: Change NavigationEntry's title fields to carry the text direction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 | « no previous file | chrome/browser/automation/testing_automation_provider.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_I18N_RTL_H_ 5 #ifndef BASE_I18N_RTL_H_
6 #define BASE_I18N_RTL_H_ 6 #define BASE_I18N_RTL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 // others to forward-declare us with 'class String16WithDirection'. 36 // others to forward-declare us with 'class String16WithDirection'.
37 class String16WithDirection { 37 class String16WithDirection {
38 public: 38 public:
39 String16WithDirection() : direction_(UNKNOWN_DIRECTION) { } 39 String16WithDirection() : direction_(UNKNOWN_DIRECTION) { }
40 String16WithDirection(const string16& str, TextDirection dir) 40 String16WithDirection(const string16& str, TextDirection dir)
41 : string_(str), direction_(dir) { } 41 : string_(str), direction_(dir) { }
42 42
43 const string16& string() const { return string_; } 43 const string16& string() const { return string_; }
44 TextDirection direction() const { return direction_; } 44 TextDirection direction() const { return direction_; }
45 45
46 bool is_empty() const { return string_.empty(); }
47 bool operator==(const String16WithDirection& other) const {
48 return string_ == other.string_ && direction_ == other.direction_;
49 }
50
46 private: 51 private:
47 string16 string_; 52 string16 string_;
48 TextDirection direction_; 53 TextDirection direction_;
49 }; 54 };
50 55
51 // Get the locale that the currently running process has been configured to use. 56 // Get the locale that the currently running process has been configured to use.
52 // The return value is of the form language[-country] (e.g., en-US) where the 57 // The return value is of the form language[-country] (e.g., en-US) where the
53 // language is the 2 or 3 letter code from ISO-639. 58 // language is the 2 or 3 letter code from ISO-639.
54 std::string GetConfiguredLocale(); 59 std::string GetConfiguredLocale();
55 60
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // return the text itself. Explicit bidi control characters display and have 162 // return the text itself. Explicit bidi control characters display and have
158 // semantic effect. They can be deleted so they might not always appear in a 163 // semantic effect. They can be deleted so they might not always appear in a
159 // pair. 164 // pair.
160 const string16 StripWrappingBidiControlCharacters(const string16& text) 165 const string16 StripWrappingBidiControlCharacters(const string16& text)
161 WARN_UNUSED_RESULT; 166 WARN_UNUSED_RESULT;
162 167
163 } // namespace i18n 168 } // namespace i18n
164 } // namespace base 169 } // namespace base
165 170
166 #endif // BASE_I18N_RTL_H_ 171 #endif // BASE_I18N_RTL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698