OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_GL_GL_ENUMS_H_ | 5 #ifndef UI_GL_GL_ENUMS_H_ |
6 #define UI_GL_GL_ENUMS_H_ | 6 #define UI_GL_GL_ENUMS_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <string> | 11 #include <string> |
9 | 12 |
10 #include "base/basictypes.h" | |
11 #include "ui/gl/gl_export.h" | 13 #include "ui/gl/gl_export.h" |
12 | 14 |
13 namespace gfx { | 15 namespace gfx { |
14 | 16 |
15 class GL_EXPORT GLEnums { | 17 class GL_EXPORT GLEnums { |
16 public: | 18 public: |
17 struct EnumToString { | 19 struct EnumToString { |
18 uint32_t value; | 20 uint32_t value; |
19 const char* name; | 21 const char* name; |
20 }; | 22 }; |
21 | 23 |
22 static std::string GetStringEnum(uint32_t value); | 24 static std::string GetStringEnum(uint32_t value); |
23 static std::string GetStringBool(uint32_t value); | 25 static std::string GetStringBool(uint32_t value); |
24 static std::string GetStringError(uint32_t value); | 26 static std::string GetStringError(uint32_t value); |
25 | 27 |
26 private: | 28 private: |
27 static const EnumToString* const enum_to_string_table_; | 29 static const EnumToString* const enum_to_string_table_; |
28 static const size_t enum_to_string_table_len_; | 30 static const size_t enum_to_string_table_len_; |
29 }; | 31 }; |
30 | 32 |
31 } // namespace gfx | 33 } // namespace gfx |
32 | 34 |
33 #endif // UI_GL_GL_ENUMS_H_ | 35 #endif // UI_GL_GL_ENUMS_H_ |
34 | 36 |
OLD | NEW |