| 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/gtk/list_store_favicon_loader.h" | 5 #include "chrome/browser/gtk/list_store_favicon_loader.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "app/gfx/codec/png_codec.h" | 9 #include "app/gfx/codec/png_codec.h" |
| 10 #include "base/gfx/gtk_util.h" | 10 #include "app/gfx/gtk_util.h" |
| 11 #include "chrome/browser/gtk/gtk_theme_provider.h" | 11 #include "chrome/browser/gtk/gtk_theme_provider.h" |
| 12 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
| 13 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
| 14 | 14 |
| 15 ListStoreFavIconLoader::ListStoreFavIconLoader( | 15 ListStoreFavIconLoader::ListStoreFavIconLoader( |
| 16 GtkListStore* list_store, gint favicon_col, gint favicon_handle_col, | 16 GtkListStore* list_store, gint favicon_col, gint favicon_handle_col, |
| 17 Profile* profile, CancelableRequestConsumer* consumer) | 17 Profile* profile, CancelableRequestConsumer* consumer) |
| 18 : list_store_(list_store), favicon_col_(favicon_col), | 18 : list_store_(list_store), favicon_col_(favicon_col), |
| 19 favicon_handle_col_(favicon_handle_col), profile_(profile), | 19 favicon_handle_col_(favicon_handle_col), profile_(profile), |
| 20 consumer_(consumer), | 20 consumer_(consumer), |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 memcpy(icon.getPixels(), &decoded_data.front(), | 81 memcpy(icon.getPixels(), &decoded_data.front(), |
| 82 width * height * 4); | 82 width * height * 4); |
| 83 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&icon); | 83 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&icon); |
| 84 gtk_list_store_set(list_store_, &iter, | 84 gtk_list_store_set(list_store_, &iter, |
| 85 favicon_col_, pixbuf, | 85 favicon_col_, pixbuf, |
| 86 -1); | 86 -1); |
| 87 g_object_unref(pixbuf); | 87 g_object_unref(pixbuf); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 } | 90 } |
| OLD | NEW |