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/app_icon_loader_impl.h" | 5 #include "chrome/browser/extensions/app_icon_loader_impl.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/extensions/extension.h" | |
12 #include "chrome/common/extensions/extension_constants.h" | 11 #include "chrome/common/extensions/extension_constants.h" |
13 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" | 12 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" |
| 13 #include "extensions/common/extension.h" |
14 #include "ui/gfx/color_utils.h" | 14 #include "ui/gfx/color_utils.h" |
15 #include "ui/gfx/image/image_skia_operations.h" | 15 #include "ui/gfx/image/image_skia_operations.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 const extensions::Extension* GetExtensionByID(Profile* profile, | 19 const extensions::Extension* GetExtensionByID(Profile* profile, |
20 const std::string& id) { | 20 const std::string& id) { |
21 ExtensionService* service = | 21 ExtensionService* service = |
22 extensions::ExtensionSystem::Get(profile)->extension_service(); | 22 extensions::ExtensionSystem::Get(profile)->extension_service(); |
23 if (!service) | 23 if (!service) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 const bool enabled = service->IsExtensionEnabledForLauncher(id); | 109 const bool enabled = service->IsExtensionEnabledForLauncher(id); |
110 if (!enabled) { | 110 if (!enabled) { |
111 const color_utils::HSL shift = {-1, 0, 0.6}; | 111 const color_utils::HSL shift = {-1, 0, 0.6}; |
112 image = gfx::ImageSkiaOperations::CreateHSLShiftedImage(image, shift); | 112 image = gfx::ImageSkiaOperations::CreateHSLShiftedImage(image, shift); |
113 } | 113 } |
114 | 114 |
115 delegate_->SetAppImage(id, image); | 115 delegate_->SetAppImage(id, image); |
116 } | 116 } |
117 | 117 |
118 } // namespace extensions | 118 } // namespace extensions |
OLD | NEW |