diff options
author | Ben Murdoch <benm@google.com> | 2010-07-29 17:14:53 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-08-04 14:29:45 +0100 |
commit | c407dc5cd9bdc5668497f21b26b09d988ab439de (patch) | |
tree | 7eaf8707c0309516bdb042ad976feedaf72b0bb1 /webkit/glue/plugins/pepper_private.cc | |
parent | 0998b1cdac5733f299c12d88bc31ef9c8035b8fa (diff) | |
download | external_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.zip external_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.tar.gz external_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.tar.bz2 |
Merge Chromium src@r53293
Change-Id: Ia79acf8670f385cee48c45b0a75371d8e950af34
Diffstat (limited to 'webkit/glue/plugins/pepper_private.cc')
-rw-r--r-- | webkit/glue/plugins/pepper_private.cc | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/webkit/glue/plugins/pepper_private.cc b/webkit/glue/plugins/pepper_private.cc new file mode 100644 index 0000000..8d5182f --- /dev/null +++ b/webkit/glue/plugins/pepper_private.cc @@ -0,0 +1,38 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "build/build_config.h" + +#include "webkit/glue/plugins/pepper_private.h" + +#include "base/utf_string_conversions.h" +#include "grit/webkit_strings.h" +#include "webkit/glue/webkit_glue.h" +#include "webkit/glue/plugins/pepper_var.h" +#include "webkit/glue/plugins/ppb_private.h" + +namespace pepper { + +namespace { + +PP_Var GetLocalizedString(PP_ResourceString string_id) { + std::string rv; + if (string_id == PP_RESOURCESTRING_PDFGETPASSWORD) + rv = UTF16ToUTF8(webkit_glue::GetLocalizedString(IDS_PDF_NEED_PASSWORD)); + + return StringToPPVar(rv); +} + +const PPB_Private ppb_private = { + &GetLocalizedString, +}; + +} // namespace + +// static +const PPB_Private* Private::GetInterface() { + return &ppb_private; +} + +} // namespace pepper |