| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/image_loader.h" | 5 #include "chrome/browser/extensions/image_loader.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
| 17 #include "chrome/browser/extensions/image_loader_factory.h" | 17 #include "chrome/browser/extensions/image_loader_factory.h" |
| 18 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
| 19 #include "chrome/common/extensions/extension.h" | |
| 20 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| 20 #include "extensions/common/extension.h" |
| 21 #include "grit/chrome_unscaled_resources.h" | 21 #include "grit/chrome_unscaled_resources.h" |
| 22 #include "grit/component_extension_resources_map.h" | 22 #include "grit/component_extension_resources_map.h" |
| 23 #include "grit/theme_resources.h" | 23 #include "grit/theme_resources.h" |
| 24 #include "skia/ext/image_operations.h" | 24 #include "skia/ext/image_operations.h" |
| 25 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
| 26 #include "ui/gfx/codec/png_codec.h" | 26 #include "ui/gfx/codec/png_codec.h" |
| 27 #include "ui/gfx/image/image_skia.h" | 27 #include "ui/gfx/image/image_skia.h" |
| 28 | 28 |
| 29 #if defined(USE_AURA) | 29 #if defined(USE_AURA) |
| 30 #include "ui/keyboard/keyboard_util.h" | 30 #include "ui/keyboard/keyboard_util.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 gfx::Image image; | 341 gfx::Image image; |
| 342 if (!image_skia.isNull()) { | 342 if (!image_skia.isNull()) { |
| 343 image_skia.MakeThreadSafe(); | 343 image_skia.MakeThreadSafe(); |
| 344 image = gfx::Image(image_skia); | 344 image = gfx::Image(image_skia); |
| 345 } | 345 } |
| 346 | 346 |
| 347 callback.Run(image); | 347 callback.Run(image); |
| 348 } | 348 } |
| 349 | 349 |
| 350 } // namespace extensions | 350 } // namespace extensions |
| OLD | NEW |