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

Unified Diff: remoting/host/plugin/host_script_object.h

Issue 10661058: Move responsibility for l10n parameters to the caller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/plugin/host_script_object.h
diff --git a/remoting/host/plugin/host_script_object.h b/remoting/host/plugin/host_script_object.h
index 9e7110e0d0ddaeb55b62c1b8303c2ce3f5e01735..b58623cedf4c7d10507b7fd8b09dad2e43770510 100644
--- a/remoting/host/plugin/host_script_object.h
+++ b/remoting/host/plugin/host_script_object.h
@@ -214,12 +214,22 @@ class HostNPScriptObject : public HostStatusObserver {
void LocalizeStrings(NPObject* localize_func);
// Helper function for executing InvokeDefault on an NPObject that performs
- // a string->string mapping with one optional substitution parameter. Stores
- // the translation in |result| and returns true on success, or leaves it
- // unchanged and returns false on failure.
+ // a string->string mapping without substitution. Stores the translation in
+ // |result| and returns true on success, or leaves it unchanged and returns
+ // false on failure.
bool LocalizeString(NPObject* localize_func, const char* tag,
string16* result);
+ // Helper function for executing InvokeDefault on an NPObject that performs
+ // a string->string mapping with up to 9 substitutions of the strings $1 to
+ // $9. Stores the translation in |result| and returns true on success, or
+ // leaves it unchanged and returns false on failure.
+ bool LocalizeStringWithSubstitutions(NPObject* localize_func,
+ const char* tag,
+ const char** substitutions,
+ int number_of_substitutions,
+ string16* result);
+
// If the web-app has registered a callback to be notified of changes to the
// NAT traversal policy, notify it.
void UpdateWebappNatPolicy(bool nat_traversal_enabled);
« no previous file with comments | « no previous file | remoting/host/plugin/host_script_object.cc » ('j') | remoting/host/plugin/host_script_object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698