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

Side by Side Diff: remoting/host/plugin/host_plugin_utils.h

Issue 7635012: Host process i18n and Linux implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change UIStrings to UiStrings. Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PLUGIN_UTILS_H_ 5 #ifndef REMOTING_HOST_PLUGIN_HOST_PLUGIN_UTILS_H_
6 #define REMOTING_HOST_PLUGIN_HOST_PLUGIN_UTILS_H_ 6 #define REMOTING_HOST_PLUGIN_HOST_PLUGIN_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "third_party/npapi/bindings/npapi.h" 10 #include "third_party/npapi/bindings/npapi.h"
(...skipping 12 matching lines...) Expand all
23 std::string StringFromNPVariant(const NPVariant& variant); 23 std::string StringFromNPVariant(const NPVariant& variant);
24 24
25 // Convert a std::string into an NPVariant. 25 // Convert a std::string into an NPVariant.
26 // Caller is responsible for making sure that NPN_ReleaseVariantValue is 26 // Caller is responsible for making sure that NPN_ReleaseVariantValue is
27 // called on returned value. 27 // called on returned value.
28 NPVariant NPVariantFromString(const std::string& val); 28 NPVariant NPVariantFromString(const std::string& val);
29 29
30 // Convert an NPVariant into an NSPObject. 30 // Convert an NPVariant into an NSPObject.
31 NPObject* ObjectFromNPVariant(const NPVariant& variant); 31 NPObject* ObjectFromNPVariant(const NPVariant& variant);
32 32
33 // Scoped pointer for NPObjects. All objects using this class must be
34 // owned by g_npnetscape_funcs.
35 class scoped_NPObject {
Sergey Ulanov 2011/08/13 01:11:36 ScopedNPObject?
Jamie 2011/08/13 01:34:03 Done.
36 public:
37 scoped_NPObject();
38 ~scoped_NPObject();
39
40 void replace(NPObject* object);
41 NPObject* get() { return object_; }
42
43 private:
44 NPObject* object_;
45 };
46
33 } // namespace remoting 47 } // namespace remoting
34 48
35 #endif // REMOTING_HOST_PLUGIN_HOST_PLUGIN_UTILS_H_ 49 #endif // REMOTING_HOST_PLUGIN_HOST_PLUGIN_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698