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

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: Reviewer comments. 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
« no previous file with comments | « no previous file | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 one substitution. Stores the translation in
225 // |result| and returns true on success, or leaves it unchanged and returns
226 // false on failure.
227 bool LocalizeStringWithSubstitution(NPObject* localize_func,
228 const char* tag,
229 const char* substitution,
230 string16* result);
231
223 // If the web-app has registered a callback to be notified of changes to the 232 // If the web-app has registered a callback to be notified of changes to the
224 // NAT traversal policy, notify it. 233 // NAT traversal policy, notify it.
225 void UpdateWebappNatPolicy(bool nat_traversal_enabled); 234 void UpdateWebappNatPolicy(bool nat_traversal_enabled);
226 235
227 ////////////////////////////////////////////////////////// 236 //////////////////////////////////////////////////////////
228 // Helper methods for Me2Me host. 237 // Helper methods for Me2Me host.
229 238
230 // Helpers for GenerateKeyPair(). 239 // Helpers for GenerateKeyPair().
231 void DoGenerateKeyPair(const ScopedRefNPObject& callback); 240 void DoGenerateKeyPair(const ScopedRefNPObject& callback);
232 void InvokeGenerateKeyPairCallback(const ScopedRefNPObject& callback, 241 void InvokeGenerateKeyPairCallback(const ScopedRefNPObject& callback,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies 343 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies
335 // on MessageLoopProxy::current(). 344 // on MessageLoopProxy::current().
336 base::Thread worker_thread_; 345 base::Thread worker_thread_;
337 346
338 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); 347 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject);
339 }; 348 };
340 349
341 } // namespace remoting 350 } // namespace remoting
342 351
343 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ 352 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698