| 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 #include "ui/base/resource/resource_bundle.h" | 5 #include "ui/base/resource/resource_bundle.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/string_piece.h" | 15 #include "base/string_piece.h" |
| 16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
| 18 #include "gfx/font.h" | |
| 19 #include "gfx/gtk_util.h" | |
| 20 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
| 21 #include "ui/base/ui_base_paths.h" | 19 #include "ui/base/ui_base_paths.h" |
| 20 #include "ui/gfx/font.h" |
| 21 #include "ui/gfx/gtk_util.h" |
| 22 | 22 |
| 23 namespace ui { | 23 namespace ui { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // Convert the raw image data into a GdkPixbuf. The GdkPixbuf that is returned | 27 // Convert the raw image data into a GdkPixbuf. The GdkPixbuf that is returned |
| 28 // has a ref count of 1 so the caller must call g_object_unref to free the | 28 // has a ref count of 1 so the caller must call g_object_unref to free the |
| 29 // memory. | 29 // memory. |
| 30 GdkPixbuf* LoadPixbuf(RefCountedStaticMemory* data, bool rtl_enabled) { | 30 GdkPixbuf* LoadPixbuf(RefCountedStaticMemory* data, bool rtl_enabled) { |
| 31 ScopedGObject<GdkPixbufLoader>::Type loader(gdk_pixbuf_loader_new()); | 31 ScopedGObject<GdkPixbufLoader>::Type loader(gdk_pixbuf_loader_new()); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 GdkPixbuf* ResourceBundle::GetPixbufNamed(int resource_id) { | 140 GdkPixbuf* ResourceBundle::GetPixbufNamed(int resource_id) { |
| 141 return GetPixbufImpl(resource_id, false); | 141 return GetPixbufImpl(resource_id, false); |
| 142 } | 142 } |
| 143 | 143 |
| 144 GdkPixbuf* ResourceBundle::GetRTLEnabledPixbufNamed(int resource_id) { | 144 GdkPixbuf* ResourceBundle::GetRTLEnabledPixbufNamed(int resource_id) { |
| 145 return GetPixbufImpl(resource_id, true); | 145 return GetPixbufImpl(resource_id, true); |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace ui | 148 } // namespace ui |
| OLD | NEW |