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

Side by Side Diff: webkit/api/src/LocalizedStrings.cpp

Issue 385057: Deleted webkit/api which now lives in webkit.org (Closed)
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « webkit/api/src/InspectorClientImpl.cpp ('k') | webkit/api/src/MediaPlayerPrivateChromium.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #include "config.h"
32 #include "LocalizedStrings.h"
33
34 #include "IntSize.h"
35 #include "NotImplemented.h"
36 #include "PlatformString.h"
37 #include "StringBuilder.h"
38
39 #include "WebKit.h"
40 #include "WebKitClient.h"
41 #include "WebLocalizedString.h"
42 #include "WebString.h"
43
44 using WebKit::WebLocalizedString;
45
46 namespace WebCore {
47
48 static String query(WebLocalizedString::Name name)
49 {
50 return WebKit::webKitClient()->queryLocalizedString(name);
51 }
52
53 static String query(WebLocalizedString::Name name, int numericValue)
54 {
55 return WebKit::webKitClient()->queryLocalizedString(name, numericValue);
56 }
57
58 String searchableIndexIntroduction()
59 {
60 return query(WebLocalizedString::SearchableIndexIntroduction);
61 }
62
63 String submitButtonDefaultLabel()
64 {
65 return query(WebLocalizedString::SubmitButtonDefaultLabel);
66 }
67
68 String inputElementAltText()
69 {
70 return query(WebLocalizedString::InputElementAltText);
71 }
72
73 String resetButtonDefaultLabel()
74 {
75 return query(WebLocalizedString::ResetButtonDefaultLabel);
76 }
77
78 String fileButtonChooseFileLabel()
79 {
80 return query(WebLocalizedString::FileButtonChooseFileLabel);
81 }
82
83 String fileButtonNoFileSelectedLabel()
84 {
85 return query(WebLocalizedString::FileButtonNoFileSelectedLabel);
86 }
87
88 String searchMenuNoRecentSearchesText()
89 {
90 return query(WebLocalizedString::SearchMenuNoRecentSearchesText);
91 }
92 String searchMenuRecentSearchesText()
93 {
94 return query(WebLocalizedString::SearchMenuRecentSearchesText);
95 }
96 String searchMenuClearRecentSearchesText()
97 {
98 return query(WebLocalizedString::SearchMenuClearRecentSearchesText);
99 }
100
101 String AXWebAreaText()
102 {
103 return query(WebLocalizedString::AXWebAreaText);
104 }
105
106 String AXLinkText()
107 {
108 return query(WebLocalizedString::AXLinkText);
109 }
110
111 String AXListMarkerText()
112 {
113 return query(WebLocalizedString::AXListMarkerText);
114 }
115
116 String AXImageMapText()
117 {
118 return query(WebLocalizedString::AXImageMapText);
119 }
120
121 String AXHeadingText()
122 {
123 return query(WebLocalizedString::AXHeadingText);
124 }
125
126 String AXDefinitionListTermText()
127 {
128 notImplemented();
129 return String("term");
130 }
131
132 String AXDefinitionListDefinitionText()
133 {
134 notImplemented();
135 return String("definition");
136 }
137
138 String AXButtonActionVerb()
139 {
140 return query(WebLocalizedString::AXButtonActionVerb);
141 }
142
143 String AXRadioButtonActionVerb()
144 {
145 return query(WebLocalizedString::AXRadioButtonActionVerb);
146 }
147
148 String AXTextFieldActionVerb()
149 {
150 return query(WebLocalizedString::AXTextFieldActionVerb);
151 }
152
153 String AXCheckedCheckBoxActionVerb()
154 {
155 return query(WebLocalizedString::AXCheckedCheckBoxActionVerb);
156 }
157
158 String AXUncheckedCheckBoxActionVerb()
159 {
160 return query(WebLocalizedString::AXUncheckedCheckBoxActionVerb);
161 }
162
163 String AXLinkActionVerb()
164 {
165 return query(WebLocalizedString::AXLinkActionVerb);
166 }
167
168 String multipleFileUploadText(unsigned numberOfFiles)
169 {
170 return query(WebLocalizedString::MultipleFileUploadText, numberOfFiles);
171 }
172
173 // Used in FTPDirectoryDocument.cpp
174 String unknownFileSizeText()
175 {
176 return String();
177 }
178
179 // The following two functions are not declared in LocalizedStrings.h.
180 // They are used by the menu for the HTML keygen tag.
181 String keygenMenuHighGradeKeySize()
182 {
183 return query(WebLocalizedString::KeygenMenuHighGradeKeySize);
184 }
185
186 String keygenMenuMediumGradeKeySize()
187 {
188 return query(WebLocalizedString::KeygenMenuMediumGradeKeySize);
189 }
190
191 // Used in ImageDocument.cpp as the title for pages when that page is an image.
192 String imageTitle(const String& filename, const IntSize& size)
193 {
194 // Note that we cannot use String::format because it works for ASCII only.
195 StringBuilder result;
196 result.append(filename);
197 result.append(" (");
198 result.append(String::number(size.width()));
199 result.append(static_cast<UChar>(0xD7)); // U+00D7 (multiplication sign)
200 result.append(String::number(size.height()));
201 result.append(")");
202 return result.toString();
203 }
204
205 // We don't use these strings, so they return an empty String. We can't just
206 // make them asserts because webcore still calls them.
207 String contextMenuItemTagOpenLinkInNewWindow() { return String(); }
208 String contextMenuItemTagDownloadLinkToDisk() { return String(); }
209 String contextMenuItemTagCopyLinkToClipboard() { return String(); }
210 String contextMenuItemTagOpenImageInNewWindow() { return String(); }
211 String contextMenuItemTagDownloadImageToDisk() { return String(); }
212 String contextMenuItemTagCopyImageToClipboard() { return String(); }
213 String contextMenuItemTagOpenFrameInNewWindow() { return String(); }
214 String contextMenuItemTagCopy() { return String(); }
215 String contextMenuItemTagGoBack() { return String(); }
216 String contextMenuItemTagGoForward() { return String(); }
217 String contextMenuItemTagStop() { return String(); }
218 String contextMenuItemTagReload() { return String(); }
219 String contextMenuItemTagCut() { return String(); }
220 String contextMenuItemTagPaste() { return String(); }
221 String contextMenuItemTagNoGuessesFound() { return String(); }
222 String contextMenuItemTagIgnoreSpelling() { return String(); }
223 String contextMenuItemTagLearnSpelling() { return String(); }
224 String contextMenuItemTagSearchWeb() { return String(); }
225 String contextMenuItemTagLookUpInDictionary() { return String(); }
226 String contextMenuItemTagOpenLink() { return String(); }
227 String contextMenuItemTagIgnoreGrammar() { return String(); }
228 String contextMenuItemTagSpellingMenu() { return String(); }
229 String contextMenuItemTagCheckSpelling() { return String(); }
230 String contextMenuItemTagCheckSpellingWhileTyping() { return String(); }
231 String contextMenuItemTagCheckGrammarWithSpelling() { return String(); }
232 String contextMenuItemTagFontMenu() { return String(); }
233 String contextMenuItemTagBold() { return String(); }
234 String contextMenuItemTagItalic() { return String(); }
235 String contextMenuItemTagUnderline() { return String(); }
236 String contextMenuItemTagOutline() { return String(); }
237 String contextMenuItemTagWritingDirectionMenu() { return String(); }
238 String contextMenuItemTagTextDirectionMenu() { return String(); }
239 String contextMenuItemTagDefaultDirection() { return String(); }
240 String contextMenuItemTagLeftToRight() { return String(); }
241 String contextMenuItemTagRightToLeft() { return String(); }
242 String contextMenuItemTagInspectElement() { return String(); }
243 String contextMenuItemTagShowSpellingPanel(bool show) { return String(); }
244 String mediaElementLiveBroadcastStateText() { return String(); }
245 String mediaElementLoadingStateText() { return String(); }
246
247 String localizedMediaControlElementString(const String& /*name*/)
248 {
249 // FIXME: to be fixed.
250 return String();
251 }
252
253 String localizedMediaControlElementHelpText(const String& /*name*/)
254 {
255 // FIXME: to be fixed.
256 return String();
257 }
258
259 String localizedMediaTimeDescription(float /*time*/)
260 {
261 // FIXME: to be fixed.
262 return String();
263 }
264
265 } // namespace WebCore
OLDNEW
« no previous file with comments | « webkit/api/src/InspectorClientImpl.cpp ('k') | webkit/api/src/MediaPlayerPrivateChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698