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

Side by Side Diff: experimental/c_salt/module.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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
« no previous file with comments | « experimental/c_salt/integration_tests/test_module.cc ('k') | experimental/c_salt/module.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2010 The Ginsu Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #ifndef C_SALT_MODULE_H_
6 #define C_SALT_MODULE_H_
7
8 #include "boost/noncopyable.hpp"
9 #include "c_salt/scripting_bridge.h"
10
11 namespace c_salt {
12
13 // The base class for a c_salt-based Native Client module. Pepper makes this
14 // a global object, and it exists as long as the module code is loaded. This
15 // class is repsonsible for creating Instances (see c_salt/instance.h).
16
17 // TODO(dspringer): This becomes a subclass of pp::Module when Pepper v2
18 // becomes available.
19 class Instance;
20
21 class Module : public boost::noncopyable {
22 public:
23 // The Module is a singleton.
24 static Module& GetModuleSingleton();
25 static void CleanUp();
26
27 // Create and return an instance of the module. The subclass can create a
28 // specific class instance.
29 virtual Instance* CreateInstance(const NPP& npp_instance) = 0;
30
31 // Initialize the OpenGL library for this module. The library termination
32 // code is called in the dtor (via CleanUp()). If OpenGL has already been
33 // initialized, this is a no-op.
34 bool InitializeOpenGL();
35
36 protected:
37 Module();
38 virtual ~Module();
39
40 private:
41 static Module* module_singleton_;
42 bool is_opengl_initialized_;
43 };
44
45 // Implemented by the module. Creates the Module associated with this Native
46 // Client module. This function is called once when the singleton Module gets
47 // created.
48 Module* CreateModule();
49
50 } // namespace c_salt
51
52 #endif // C_SALT_MODULE_H_
OLDNEW
« no previous file with comments | « experimental/c_salt/integration_tests/test_module.cc ('k') | experimental/c_salt/module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698