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

Side by Side Diff: ui/base/l10n/l10n_util_mac.h

Issue 93863005: ui: Rename ui_export.h to ui_base_export.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: UI_BASE_IMPLEMENTATION Created 6 years, 11 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 | « ui/base/l10n/l10n_util_collator.h ('k') | ui/base/l10n/l10n_util_win.h » ('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 UI_BASE_L10N_L10N_UTIL_MAC_H_ 5 #ifndef UI_BASE_L10N_L10N_UTIL_MAC_H_
6 #define UI_BASE_L10N_L10N_UTIL_MAC_H_ 6 #define UI_BASE_L10N_L10N_UTIL_MAC_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "ui/base/ui_export.h" 13 #include "ui/base/ui_base_export.h"
14 14
15 #ifdef __OBJC__ 15 #ifdef __OBJC__
16 @class NSString; 16 @class NSString;
17 #else 17 #else
18 class NSString; 18 class NSString;
19 #endif 19 #endif
20 20
21 namespace l10n_util { 21 namespace l10n_util {
22 22
23 // Remove the Windows-style accelerator marker (for labels, menuitems, etc.) 23 // Remove the Windows-style accelerator marker (for labels, menuitems, etc.)
24 // and change "..." into an ellipsis. 24 // and change "..." into an ellipsis.
25 // Returns the result in an autoreleased NSString. 25 // Returns the result in an autoreleased NSString.
26 UI_EXPORT NSString* FixUpWindowsStyleLabel(const base::string16& label); 26 UI_BASE_EXPORT NSString* FixUpWindowsStyleLabel(const base::string16& label);
27 27
28 // Pulls resource string from the string bundle and returns it. 28 // Pulls resource string from the string bundle and returns it.
29 UI_EXPORT NSString* GetNSString(int message_id); 29 UI_BASE_EXPORT NSString* GetNSString(int message_id);
30 30
31 // Get a resource string and replace $1-$2-$3 with |a| and |b| 31 // Get a resource string and replace $1-$2-$3 with |a| and |b|
32 // respectively. Additionally, $$ is replaced by $. 32 // respectively. Additionally, $$ is replaced by $.
33 UI_EXPORT NSString* GetNSStringF(int message_id, 33 UI_BASE_EXPORT NSString* GetNSStringF(int message_id, const base::string16& a);
34 const base::string16& a); 34 UI_BASE_EXPORT NSString* GetNSStringF(int message_id,
35 UI_EXPORT NSString* GetNSStringF(int message_id, 35 const base::string16& a,
36 const base::string16& a, 36 const base::string16& b);
37 const base::string16& b); 37 UI_BASE_EXPORT NSString* GetNSStringF(int message_id,
38 UI_EXPORT NSString* GetNSStringF(int message_id, 38 const base::string16& a,
39 const base::string16& a, 39 const base::string16& b,
40 const base::string16& b, 40 const base::string16& c);
41 const base::string16& c); 41 UI_BASE_EXPORT NSString* GetNSStringF(int message_id,
42 UI_EXPORT NSString* GetNSStringF(int message_id, 42 const base::string16& a,
43 const base::string16& a, 43 const base::string16& b,
44 const base::string16& b, 44 const base::string16& c,
45 const base::string16& c, 45 const base::string16& d);
46 const base::string16& d);
47 46
48 // Variants that return the offset(s) of the replaced parameters. (See 47 // Variants that return the offset(s) of the replaced parameters. (See
49 // app/l10n_util.h for more details.) 48 // app/l10n_util.h for more details.)
50 UI_EXPORT NSString* GetNSStringF(int message_id, 49 UI_BASE_EXPORT NSString* GetNSStringF(int message_id,
51 const base::string16& a, 50 const base::string16& a,
52 const base::string16& b, 51 const base::string16& b,
53 std::vector<size_t>* offsets); 52 std::vector<size_t>* offsets);
54 53
55 // Same as GetNSString, but runs the result through FixUpWindowsStyleLabel 54 // Same as GetNSString, but runs the result through FixUpWindowsStyleLabel
56 // before returning it. 55 // before returning it.
57 UI_EXPORT NSString* GetNSStringWithFixup(int message_id); 56 UI_BASE_EXPORT NSString* GetNSStringWithFixup(int message_id);
58 57
59 // Same as GetNSStringF, but runs the result through FixUpWindowsStyleLabel 58 // Same as GetNSStringF, but runs the result through FixUpWindowsStyleLabel
60 // before returning it. 59 // before returning it.
61 UI_EXPORT NSString* GetNSStringFWithFixup(int message_id, 60 UI_BASE_EXPORT NSString* GetNSStringFWithFixup(int message_id,
62 const base::string16& a); 61 const base::string16& a);
63 UI_EXPORT NSString* GetNSStringFWithFixup(int message_id, 62 UI_BASE_EXPORT NSString* GetNSStringFWithFixup(int message_id,
64 const base::string16& a, 63 const base::string16& a,
65 const base::string16& b); 64 const base::string16& b);
66 UI_EXPORT NSString* GetNSStringFWithFixup(int message_id, 65 UI_BASE_EXPORT NSString* GetNSStringFWithFixup(int message_id,
67 const base::string16& a, 66 const base::string16& a,
68 const base::string16& b, 67 const base::string16& b,
69 const base::string16& c); 68 const base::string16& c);
70 UI_EXPORT NSString* GetNSStringFWithFixup(int message_id, 69 UI_BASE_EXPORT NSString* GetNSStringFWithFixup(int message_id,
71 const base::string16& a, 70 const base::string16& a,
72 const base::string16& b, 71 const base::string16& b,
73 const base::string16& c, 72 const base::string16& c,
74 const base::string16& d); 73 const base::string16& d);
75 74
76 // Support the override of the locale with the value from Cocoa. 75 // Support the override of the locale with the value from Cocoa.
77 UI_EXPORT void OverrideLocaleWithCocoaLocale(); 76 UI_BASE_EXPORT void OverrideLocaleWithCocoaLocale();
78 UI_EXPORT const std::string& GetLocaleOverride(); 77 UI_BASE_EXPORT const std::string& GetLocaleOverride();
79 78
80 } // namespace l10n_util 79 } // namespace l10n_util
81 80
82 #endif // UI_BASE_L10N_L10N_UTIL_MAC_H_ 81 #endif // UI_BASE_L10N_L10N_UTIL_MAC_H_
OLDNEW
« no previous file with comments | « ui/base/l10n/l10n_util_collator.h ('k') | ui/base/l10n/l10n_util_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698