| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/icon_loader.h" | 5 #include "chrome/browser/icon_loader.h" |
| 6 | 6 |
| 7 #include <gdk-pixbuf/gdk-pixbuf.h> | 7 #include <gdk-pixbuf/gdk-pixbuf.h> |
| 8 #include <gio/gio.h> | 8 #include <gio/gio.h> |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/mime_util.h" | 14 #include "base/mime_util.h" |
| 15 #include "base/thread.h" | 15 #include "base/threading/thread.h" |
| 16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 #include "gfx/codec/png_codec.h" | 17 #include "gfx/codec/png_codec.h" |
| 18 #include "gfx/gtk_util.h" | 18 #include "gfx/gtk_util.h" |
| 19 #include "third_party/skia/include/core/SkBitmap.h" | 19 #include "third_party/skia/include/core/SkBitmap.h" |
| 20 | 20 |
| 21 static int SizeToInt(IconLoader::IconSize size) { | 21 static int SizeToInt(IconLoader::IconSize size) { |
| 22 int pixels = 48; | 22 int pixels = 48; |
| 23 if (size == IconLoader::NORMAL) | 23 if (size == IconLoader::NORMAL) |
| 24 pixels = 32; | 24 pixels = 32; |
| 25 else if (size == IconLoader::SMALL) | 25 else if (size == IconLoader::SMALL) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 72 } |
| 73 } else { | 73 } else { |
| 74 LOG(WARNING) << "Unsupported file type or load error: " << | 74 LOG(WARNING) << "Unsupported file type or load error: " << |
| 75 filename_.value(); | 75 filename_.value(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 g_object_unref(loader); | 78 g_object_unref(loader); |
| 79 | 79 |
| 80 NotifyDelegate(); | 80 NotifyDelegate(); |
| 81 } | 81 } |
| OLD | NEW |