| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chromeos/extensions/gfx_utils.h" | 5 #include "chrome/browser/chromeos/extensions/gfx_utils.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 8 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 10 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return iter->second; | 128 return iter->second; |
| 129 } | 129 } |
| 130 | 130 |
| 131 private: | 131 private: |
| 132 ArcAppToExtensionsMap arc_app_to_extensions_map_; | 132 ArcAppToExtensionsMap arc_app_to_extensions_map_; |
| 133 ExtensionToArcAppMap extension_to_arc_app_map_; | 133 ExtensionToArcAppMap extension_to_arc_app_map_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(AppDualBadgeMap); | 135 DISALLOW_COPY_AND_ASSIGN(AppDualBadgeMap); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 base::LazyInstance<AppDualBadgeMap> g_dual_badge_map = | 138 base::LazyInstance<AppDualBadgeMap>::DestructorAtExit g_dual_badge_map = |
| 139 LAZY_INSTANCE_INITIALIZER; | 139 LAZY_INSTANCE_INITIALIZER; |
| 140 | 140 |
| 141 } // namespace | 141 } // namespace |
| 142 | 142 |
| 143 namespace util { | 143 namespace util { |
| 144 | 144 |
| 145 bool HasEquivalentInstalledArcApp(content::BrowserContext* context, | 145 bool HasEquivalentInstalledArcApp(content::BrowserContext* context, |
| 146 const std::string& extension_id) { | 146 const std::string& extension_id) { |
| 147 const std::string arc_package_name = | 147 const std::string arc_package_name = |
| 148 g_dual_badge_map.Get().GetArcPackageNameFromExtensionId(extension_id); | 148 g_dual_badge_map.Get().GetArcPackageNameFromExtensionId(extension_id); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 resized_badge_image = gfx::ImageSkiaOperations::CreateResizedImage( | 209 resized_badge_image = gfx::ImageSkiaOperations::CreateResizedImage( |
| 210 *badge_image, skia::ImageOperations::RESIZE_BEST, icon_out->size()); | 210 *badge_image, skia::ImageOperations::RESIZE_BEST, icon_out->size()); |
| 211 } | 211 } |
| 212 *icon_out = gfx::ImageSkiaOperations::CreateSuperimposedImage( | 212 *icon_out = gfx::ImageSkiaOperations::CreateSuperimposedImage( |
| 213 *icon_out, resized_badge_image); | 213 *icon_out, resized_badge_image); |
| 214 return; | 214 return; |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace util | 217 } // namespace util |
| 218 } // namespace extensions | 218 } // namespace extensions |
| OLD | NEW |