| OLD | NEW |
| (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 |
| OLD | NEW |