OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 GFX_GTK_UTIL_H_ | 5 #ifndef UI_GFX_GTK_UTIL_H_ |
6 #define GFX_GTK_UTIL_H_ | 6 #define UI_GFX_GTK_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <glib-object.h> | 9 #include <glib-object.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
16 | 16 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 } // namespace | 74 } // namespace |
75 | 75 |
76 // It's not legal C++ to have a templatized typedefs, so we wrap it in a | 76 // It's not legal C++ to have a templatized typedefs, so we wrap it in a |
77 // struct. When using this, you need to include ::Type. E.g., | 77 // struct. When using this, you need to include ::Type. E.g., |
78 // ScopedGObject<GdkPixbufLoader>::Type loader(gdk_pixbuf_loader_new()); | 78 // ScopedGObject<GdkPixbufLoader>::Type loader(gdk_pixbuf_loader_new()); |
79 template<class T> | 79 template<class T> |
80 struct ScopedGObject { | 80 struct ScopedGObject { |
81 typedef scoped_ptr_malloc<T, GObjectUnrefer<T> > Type; | 81 typedef scoped_ptr_malloc<T, GObjectUnrefer<T> > Type; |
82 }; | 82 }; |
83 | 83 |
84 #endif // GFX_GTK_UTIL_H_ | 84 #endif // UI_GFX_GTK_UTIL_H_ |
OLD | NEW |