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

Side by Side 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, 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ 5 #ifndef REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_
6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ 6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 // Callback for ChromotingHost::Shutdown(). 208 // Callback for ChromotingHost::Shutdown().
209 void OnShutdownFinished(); 209 void OnShutdownFinished();
210 210
211 // Called when the nat traversal policy is updated. 211 // Called when the nat traversal policy is updated.
212 void OnNatPolicyUpdate(bool nat_traversal_enabled); 212 void OnNatPolicyUpdate(bool nat_traversal_enabled);
213 213
214 void LocalizeStrings(NPObject* localize_func); 214 void LocalizeStrings(NPObject* localize_func);
215 215
216 // Helper function for executing InvokeDefault on an NPObject that performs 216 // Helper function for executing InvokeDefault on an NPObject that performs
217 // a string->string mapping with one optional substitution parameter. Stores 217 // a string->string mapping without substitution. Stores the translation in
218 // the translation in |result| and returns true on success, or leaves it 218 // |result| and returns true on success, or leaves it unchanged and returns
219 // unchanged and returns false on failure. 219 // false on failure.
220 bool LocalizeString(NPObject* localize_func, const char* tag, 220 bool LocalizeString(NPObject* localize_func, const char* tag,
221 string16* result); 221 string16* result);
222 222
223 // Helper function for executing InvokeDefault on an NPObject that performs
224 // a string->string mapping with up to 9 substitutions of the strings $1 to
225 // $9. Stores the translation in |result| and returns true on success, or
226 // leaves it unchanged and returns false on failure.
227 bool LocalizeStringWithSubstitutions(NPObject* localize_func,
228 const char* tag,
229 const char** substitutions,
230 int number_of_substitutions,
231 string16* result);
232
223 // If the web-app has registered a callback to be notified of changes to the 233 // If the web-app has registered a callback to be notified of changes to the
224 // NAT traversal policy, notify it. 234 // NAT traversal policy, notify it.
225 void UpdateWebappNatPolicy(bool nat_traversal_enabled); 235 void UpdateWebappNatPolicy(bool nat_traversal_enabled);
226 236
227 ////////////////////////////////////////////////////////// 237 //////////////////////////////////////////////////////////
228 // Helper methods for Me2Me host. 238 // Helper methods for Me2Me host.
229 239
230 // Helpers for GenerateKeyPair(). 240 // Helpers for GenerateKeyPair().
231 void DoGenerateKeyPair(const ScopedRefNPObject& callback); 241 void DoGenerateKeyPair(const ScopedRefNPObject& callback);
232 void InvokeGenerateKeyPairCallback(const ScopedRefNPObject& callback, 242 void InvokeGenerateKeyPairCallback(const ScopedRefNPObject& callback,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies 344 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies
335 // on MessageLoopProxy::current(). 345 // on MessageLoopProxy::current().
336 base::Thread worker_thread_; 346 base::Thread worker_thread_;
337 347
338 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); 348 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject);
339 }; 349 };
340 350
341 } // namespace remoting 351 } // namespace remoting
342 352
343 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ 353 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_
OLDNEW
« 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