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 #include "chrome/browser/themes/browser_theme_provider.h" | 5 #include "chrome/browser/themes/browser_theme_provider.h" |
6 | 6 |
7 #include <gdk-pixbuf/gdk-pixbuf.h> | 7 #include <gdk-pixbuf/gdk-pixbuf.h> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "gfx/gtk_util.h" | |
12 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
| 12 #include "ui/gfx/gtk_util.h" |
13 | 13 |
14 GdkPixbuf* BrowserThemeProvider::GetPixbufNamed(int id) const { | 14 GdkPixbuf* BrowserThemeProvider::GetPixbufNamed(int id) const { |
15 return GetPixbufImpl(id, false); | 15 return GetPixbufImpl(id, false); |
16 } | 16 } |
17 | 17 |
18 GdkPixbuf* BrowserThemeProvider::GetRTLEnabledPixbufNamed(int id) const { | 18 GdkPixbuf* BrowserThemeProvider::GetRTLEnabledPixbufNamed(int id) const { |
19 return GetPixbufImpl(id, true); | 19 return GetPixbufImpl(id, true); |
20 } | 20 } |
21 | 21 |
22 GdkPixbuf* BrowserThemeProvider::GetPixbufImpl(int id, bool rtl_enabled) const { | 22 GdkPixbuf* BrowserThemeProvider::GetPixbufImpl(int id, bool rtl_enabled) const { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void BrowserThemeProvider::FreePlatformCaches() { | 64 void BrowserThemeProvider::FreePlatformCaches() { |
65 DCHECK(CalledOnValidThread()); | 65 DCHECK(CalledOnValidThread()); |
66 | 66 |
67 // Free GdkPixbufs. | 67 // Free GdkPixbufs. |
68 for (GdkPixbufMap::iterator i = gdk_pixbufs_.begin(); | 68 for (GdkPixbufMap::iterator i = gdk_pixbufs_.begin(); |
69 i != gdk_pixbufs_.end(); i++) { | 69 i != gdk_pixbufs_.end(); i++) { |
70 g_object_unref(i->second); | 70 g_object_unref(i->second); |
71 } | 71 } |
72 gdk_pixbufs_.clear(); | 72 gdk_pixbufs_.clear(); |
73 } | 73 } |
OLD | NEW |