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

Unified Diff: native_client_sdk/src/examples/tutorial/load_progress/load_progress.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/load_progress/load_progress.cc
diff --git a/native_client_sdk/src/examples/tutorial/load_progress/load_progress.cc b/native_client_sdk/src/examples/tutorial/load_progress/load_progress.cc
index 3ed7583c4c536eda45a57b2e21e68f129af95e27..d1005c39cdb58e7d9233895d2b47d32b64233680 100644
--- a/native_client_sdk/src/examples/tutorial/load_progress/load_progress.cc
+++ b/native_client_sdk/src/examples/tutorial/load_progress/load_progress.cc
@@ -2,31 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-/// @file
-/// This example demonstrates loading and running a very simple NaCl
-/// module. To load the NaCl module, the browser first looks for the
-/// CreateModule() factory method (at the end of this file). It calls
-/// CreateModule() once to load the module code from your .nexe. After the
-/// .nexe code is loaded, CreateModule() is not called again.
-///
-/// Once the .nexe code is loaded, the browser then calls the
-/// LoadProgressModule::CreateInstance()
-/// method on the object returned by CreateModule(). It calls CreateInstance()
-/// each time it encounters an <embed> tag that references your NaCl module.
-
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/var.h"
-namespace load_progress {
-/// The Instance class. One of these exists for each instance of your NaCl
-/// module on the web page. The browser will ask the Module object to create
-/// a new Instance for each occurrence of the <embed> tag that has these
-/// attributes:
-/// <pre>
-/// type="application/x-nacl"
-/// nacl="hello_world.nmf"
-/// </pre>
class LoadProgressInstance : public pp::Instance {
public:
explicit LoadProgressInstance(PP_Instance instance)
@@ -34,32 +12,16 @@ class LoadProgressInstance : public pp::Instance {
virtual ~LoadProgressInstance() {}
};
-/// 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
-/// <code>type="application/x-nacl"</code>.
class LoadProgressModule : public pp::Module {
public:
LoadProgressModule() : pp::Module() {}
virtual ~LoadProgressModule() {}
- /// Create and return a HelloWorldInstance object.
- /// @param[in] instance a handle to a plug-in instance.
- /// @return a newly created HelloWorldInstance.
- /// @note The browser is responsible for calling @a delete when done.
virtual pp::Instance* CreateInstance(PP_Instance instance) {
return new LoadProgressInstance(instance);
}
};
-} // namespace load_progress
namespace pp {
-/// 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.
-/// @return new LoadProgressModule.
-/// @note The browser is responsible for deleting returned @a Module.
-Module* CreateModule() { return new load_progress::LoadProgressModule(); }
+Module* CreateModule() { return new LoadProgressModule(); }
} // namespace pp

Powered by Google App Engine
This is Rietveld 408576698