Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: chrome/browser/chromeos/extensions/gfx_utils.cc

Issue 2819413003: Refactor extension app icon. (Closed)
Patch Set: nit Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/notification_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 {"com.google.android.apps.classroom", "mfhehppjhmmnlfbbopchdfldgimhfhfk"}, 87 {"com.google.android.apps.classroom", "mfhehppjhmmnlfbbopchdfldgimhfhfk"},
88 // Google Hangouts 88 // Google Hangouts
89 {"com.google.android.talk", "knipolnnllmklapflnccelgolnpehhpl"}, 89 {"com.google.android.talk", "knipolnnllmklapflnccelgolnpehhpl"},
90 {"com.google.android.talk", "cgmlfbhkckbedohgdepgbkflommbfkep"}, 90 {"com.google.android.talk", "cgmlfbhkckbedohgdepgbkflommbfkep"},
91 {"com.google.android.talk", "gldgpnmcpaogjlojhhpebkbbanacoglc"}, 91 {"com.google.android.talk", "gldgpnmcpaogjlojhhpebkbbanacoglc"},
92 // Google Play Music 92 // Google Play Music
93 {"com.google.android.music", "fahmaaghhglfmonjliepjlchgpgfmobi"}, 93 {"com.google.android.music", "fahmaaghhglfmonjliepjlchgpgfmobi"},
94 // Google News 94 // Google News
95 {"com.google.android.apps.genie.geniewidget", 95 {"com.google.android.apps.genie.geniewidget",
96 "dllkocilcinkggkchnjgegijklcililc"}, 96 "dllkocilcinkggkchnjgegijklcililc"},
97 // Used in unit tests.
98 {"fake.package.name1", "emfkafnhnpcmabnnkckkchdilgeoekbo"},
97 }; 99 };
98 100
99 // This class maintains the maps between the extension id and its equivalent 101 // This class maintains the maps between the extension id and its equivalent
100 // ARC package name. 102 // ARC package name.
101 class AppDualBadgeMap { 103 class AppDualBadgeMap {
102 public: 104 public:
103 using ArcAppToExtensionsMap = 105 using ArcAppToExtensionsMap =
104 std::unordered_map<std::string, std::vector<std::string>>; 106 std::unordered_map<std::string, std::vector<std::string>>;
105 using ExtensionToArcAppMap = std::unordered_map<std::string, std::string>; 107 using ExtensionToArcAppMap = std::unordered_map<std::string, std::string>;
106 108
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 resized_badge_image = gfx::ImageSkiaOperations::CreateResizedImage( 211 resized_badge_image = gfx::ImageSkiaOperations::CreateResizedImage(
210 *badge_image, skia::ImageOperations::RESIZE_BEST, icon_out->size()); 212 *badge_image, skia::ImageOperations::RESIZE_BEST, icon_out->size());
211 } 213 }
212 *icon_out = gfx::ImageSkiaOperations::CreateSuperimposedImage( 214 *icon_out = gfx::ImageSkiaOperations::CreateSuperimposedImage(
213 *icon_out, resized_badge_image); 215 *icon_out, resized_badge_image);
214 return; 216 return;
215 } 217 }
216 218
217 } // namespace util 219 } // namespace util
218 } // namespace extensions 220 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698