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

Side by Side Diff: webkit/glue/plugins/pepper_private.cc

Issue 3035005: Add private Pepper v2 API to get localized strings. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "build/build_config.h"
6
7 #include "webkit/glue/plugins/pepper_private.h"
8
9 #include "base/utf_string_conversions.h"
10 #include "grit/webkit_strings.h"
11 #include "webkit/glue/webkit_glue.h"
12 #include "webkit/glue/plugins/pepper_var.h"
13 #include "webkit/glue/plugins/ppb_private.h"
14
15 namespace pepper {
16
17 namespace {
18
19 PP_Var GetLocalizedString(PP_ResourceString string_id) {
20 std::string rv;
21 if (string_id == PPB_RESOURCE_STRING_PDF_GET_PASSWORD)
22 rv = UTF16ToUTF8(webkit_glue::GetLocalizedString(IDS_PDF_NEED_PASSWORD));
23
24 return StringToPPVar(rv);
25 }
26
27 const PPB_Private ppb_private = {
28 &GetLocalizedString,
29 };
30
31 } // namespace
32
33 // static
34 const PPB_Private* Private::GetInterface() {
35 return &ppb_private;
36 }
37
38 } // namespace pepper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698