OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef PPAPI_CPP_GRAPHICS_3D_CLIENT_H_ | 5 #ifndef PPAPI_CPP_GRAPHICS_3D_CLIENT_H_ |
6 #define PPAPI_CPP_GRAPHICS_3D_CLIENT_H_ | 6 #define PPAPI_CPP_GRAPHICS_3D_CLIENT_H_ |
7 | 7 |
8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
9 #include "ppapi/cpp/instance_handle.h" | 9 #include "ppapi/cpp/instance_handle.h" |
10 | 10 |
11 /// @file | 11 /// @file |
12 /// This file defines the API for callbacks related to 3D. | 12 /// This file defines the API for callbacks related to 3D. |
13 | 13 |
14 namespace pp { | 14 namespace pp { |
15 | 15 |
| 16 class Instance; |
| 17 |
16 // This class provides a C++ interface for callbacks related to 3D. You | 18 // This class provides a C++ interface for callbacks related to 3D. You |
17 // would normally use multiple inheritance to derive from this class in your | 19 // would normally use multiple inheritance to derive from this class in your |
18 // instance. | 20 // instance. |
19 class Graphics3DClient { | 21 class Graphics3DClient { |
20 public: | 22 public: |
21 /// | 23 /// |
22 /// A constructor for creating a Graphics3DClient. | 24 /// A constructor for creating a Graphics3DClient. |
23 /// | 25 /// |
24 /// @param[in] instance The instance that will own the new | 26 /// @param[in] instance The instance that will own the new |
25 /// <code>Graphics3DClient</code>. | 27 /// <code>Graphics3DClient</code>. |
26 explicit Graphics3DClient(const InstanceHandle& instance); | 28 explicit Graphics3DClient(Instance* instance); |
27 | 29 |
28 /// Destructor. | 30 /// Destructor. |
29 virtual ~Graphics3DClient(); | 31 virtual ~Graphics3DClient(); |
30 | 32 |
31 /// Graphics3DContextLost() is a notification that the context was lost for | 33 /// Graphics3DContextLost() is a notification that the context was lost for |
32 /// the 3D devices. | 34 /// the 3D devices. |
33 virtual void Graphics3DContextLost() = 0; | 35 virtual void Graphics3DContextLost() = 0; |
34 | 36 |
35 private: | 37 private: |
36 InstanceHandle associated_instance_; | 38 InstanceHandle associated_instance_; |
37 }; | 39 }; |
38 | 40 |
39 } // namespace pp | 41 } // namespace pp |
40 | 42 |
41 #endif // PPAPI_CPP_GRAPHICS_3D_CLIENT_H_ | 43 #endif // PPAPI_CPP_GRAPHICS_3D_CLIENT_H_ |
OLD | NEW |