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

Unified Diff: native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc

Issue 14607005: [NaCl SDK] Cleanup examples. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc
diff --git a/native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc b/native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc
index 90a59fdd0f30fa6d343181d199a2daa8fce6a931..42be6798a67ec2c9fc4b3449d5d69683c4dc2b56 100644
--- a/native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc
+++ b/native_client_sdk/src/examples/tutorial/dlopen/dlopen.cc
@@ -40,9 +40,9 @@
#define STRINGIFY(x) #x
#define NACL_ARCH_STRING XSTRINGIFY(NACL_ARCH)
-class DlopenInstance : public pp::Instance {
+class DlOpenInstance : public pp::Instance {
public:
- explicit DlopenInstance(PP_Instance instance)
+ explicit DlOpenInstance(PP_Instance instance)
: pp::Instance(instance),
eightball_so_(NULL),
reverse_so_(NULL),
@@ -50,8 +50,7 @@ class DlopenInstance : public pp::Instance {
reverse_(NULL),
tid_(NULL) {}
- virtual ~DlopenInstance() {}
- ;
+ virtual ~DlOpenInstance() {}
// Helper function to post a message back to the JS and stdout functions.
void logmsg(const char* pStr) {
@@ -167,13 +166,13 @@ class DlopenInstance : public pp::Instance {
}
static void* LoadLibrariesOnWorker(void* pInst) {
- DlopenInstance* inst = static_cast<DlopenInstance*>(pInst);
+ DlOpenInstance* inst = static_cast<DlOpenInstance*>(pInst);
inst->LoadLibrary();
return NULL;
}
static void LoadDoneCB(void* pInst, int32_t result) {
- DlopenInstance* inst = static_cast<DlopenInstance*>(pInst);
+ DlOpenInstance* inst = static_cast<DlOpenInstance*>(pInst);
inst->UseLibrary();
}
@@ -185,25 +184,17 @@ class DlopenInstance : public pp::Instance {
pthread_t tid_;
};
-// The Module class. The browser calls the CreateInstance() method to create
-// an instance of your NaCl module on the web page. The browser creates a new
-// instance for each <embed> tag with type="application/x-nacl".
-class dlOpenModule : public pp::Module {
+class DlOpenModule : public pp::Module {
public:
- dlOpenModule() : pp::Module() {}
- virtual ~dlOpenModule() {}
+ DlOpenModule() : pp::Module() {}
+ virtual ~DlOpenModule() {}
- // Create and return a DlopenInstance object.
+ // Create and return a DlOpenInstance object.
virtual pp::Instance* CreateInstance(PP_Instance instance) {
- return new DlopenInstance(instance);
+ return new DlOpenInstance(instance);
}
};
-// Factory function called by the browser when the module is first loaded.
-// The browser keeps a singleton of this module. It calls the
-// CreateInstance() method on the object you return to make instances. There
-// is one instance per <embed> tag on the page. This is the main binding
-// point for your NaCl module with the browser.
namespace pp {
-Module* CreateModule() { return new dlOpenModule(); }
+Module* CreateModule() { return new DlOpenModule(); }
} // namespace pp

Powered by Google App Engine
This is Rietveld 408576698