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

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

Issue 11147004: use CXX compiler for c++ files (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
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 24 matching lines...) Expand all
35 #include "ppapi/cpp/var.h" 35 #include "ppapi/cpp/var.h"
36 #include "ppapi/cpp/var_array_buffer.h" 36 #include "ppapi/cpp/var_array_buffer.h"
37 #include "ppapi/utility/completion_callback_factory.h" 37 #include "ppapi/utility/completion_callback_factory.h"
38 38
39 #ifdef WIN32 39 #ifdef WIN32
40 #undef min 40 #undef min
41 #undef max 41 #undef max
42 #undef PostMessage 42 #undef PostMessage
43 #endif 43 #endif
44 44
45 #ifdef _MSC_VER
binji 2012/10/12 23:05:59 let's be consistent about whether we use _MSC_VER
46 // Allow 'this' in initializer list
47 #pragma warning(disable : 4355)
48 // Disable warning about behaviour of array initialization.
49 #pragma warning(disable : 4351)
50 #endif
51
45 namespace { 52 namespace {
46 53
47 const uint32_t kBlue = 0xff4040ffu; 54 const uint32_t kBlue = 0xff4040ffu;
48 const uint32_t kBlack = 0xff000000u; 55 const uint32_t kBlack = 0xff000000u;
49 const size_t kHistogramSize = 256u; 56 const size_t kHistogramSize = 256u;
50 57
51 } // namespace 58 } // namespace
52 59
53 /// The Instance class. One of these exists for each instance of your NaCl 60 /// The Instance class. One of these exists for each instance of your NaCl
54 /// module on the web page. The browser will ask the Module object to create 61 /// module on the web page. The browser will ask the Module object to create
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 namespace pp { 230 namespace pp {
224 /// Factory function called by the browser when the module is first loaded. 231 /// Factory function called by the browser when the module is first loaded.
225 /// The browser keeps a singleton of this module. It calls the 232 /// The browser keeps a singleton of this module. It calls the
226 /// CreateInstance() method on the object you return to make instances. There 233 /// CreateInstance() method on the object you return to make instances. There
227 /// is one instance per <embed> tag on the page. This is the main binding 234 /// is one instance per <embed> tag on the page. This is the main binding
228 /// point for your NaCl module with the browser. 235 /// point for your NaCl module with the browser.
229 Module* CreateModule() { 236 Module* CreateModule() {
230 return new FileHistogramModule(); 237 return new FileHistogramModule();
231 } 238 }
232 } // namespace pp 239 } // namespace pp
OLDNEW
« no previous file with comments | « native_client_sdk/src/build_tools/make_rules.py ('k') | native_client_sdk/src/examples/geturl/geturl_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698