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

Side by Side Diff: native_client_sdk/src/examples/file_histogram/file_histogram.cc

Issue 13106002: [NaCl SDK] A bunch of spelling fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix presubmit Created 7 years, 9 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 /// @file file_histogram.cc 5 /// @file file_histogram.cc
6 /// This example demonstrates loading, running and scripting a very simple NaCl 6 /// This example demonstrates loading, running and scripting a very simple NaCl
7 /// module. To load the NaCl module, the browser first looks for the 7 /// module. To load the NaCl module, the browser first looks for the
8 /// CreateModule() factory method (at the end of this file). It calls 8 /// CreateModule() factory method (at the end of this file). It calls
9 /// CreateModule() once to load the module code from your .nexe. After the 9 /// CreateModule() once to load the module code from your .nexe. After the
10 /// .nexe code is loaded, CreateModule() is not called again. 10 /// .nexe code is loaded, CreateModule() is not called again.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 namespace { 50 namespace {
51 51
52 const uint32_t kBlue = 0xff4040ffu; 52 const uint32_t kBlue = 0xff4040ffu;
53 const uint32_t kBlack = 0xff000000u; 53 const uint32_t kBlack = 0xff000000u;
54 const size_t kHistogramSize = 256u; 54 const size_t kHistogramSize = 256u;
55 55
56 } // namespace 56 } // namespace
57 57
58 /// The Instance class. One of these exists for each instance of your NaCl 58 /// The Instance class. One of these exists for each instance of your NaCl
59 /// module on the web page. The browser will ask the Module object to create 59 /// module on the web page. The browser will ask the Module object to create
60 /// a new Instance for each occurence of the <embed> tag that has these 60 /// a new Instance for each occurrence of the <embed> tag that has these
61 /// attributes: 61 /// attributes:
62 /// type="application/x-nacl" 62 /// type="application/x-nacl"
63 /// src="file_histogram.nmf" 63 /// src="file_histogram.nmf"
64 class FileHistogramInstance : public pp::Instance { 64 class FileHistogramInstance : public pp::Instance {
65 public: 65 public:
66 /// The constructor creates the plugin-side instance. 66 /// The constructor creates the plugin-side instance.
67 /// @param[in] instance the handle to the browser-side plugin instance. 67 /// @param[in] instance the handle to the browser-side plugin instance.
68 explicit FileHistogramInstance(PP_Instance instance) 68 explicit FileHistogramInstance(PP_Instance instance)
69 : pp::Instance(instance), 69 : pp::Instance(instance),
70 callback_factory_(this), 70 callback_factory_(this),
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 namespace pp { 228 namespace pp {
229 /// Factory function called by the browser when the module is first loaded. 229 /// Factory function called by the browser when the module is first loaded.
230 /// The browser keeps a singleton of this module. It calls the 230 /// The browser keeps a singleton of this module. It calls the
231 /// CreateInstance() method on the object you return to make instances. There 231 /// CreateInstance() method on the object you return to make instances. There
232 /// is one instance per <embed> tag on the page. This is the main binding 232 /// is one instance per <embed> tag on the page. This is the main binding
233 /// point for your NaCl module with the browser. 233 /// point for your NaCl module with the browser.
234 Module* CreateModule() { 234 Module* CreateModule() {
235 return new FileHistogramModule(); 235 return new FileHistogramModule();
236 } 236 }
237 } // namespace pp 237 } // namespace pp
OLDNEW
« no previous file with comments | « native_client_sdk/src/examples/dlopen/dlopen.cc ('k') | native_client_sdk/src/examples/file_io/file_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698