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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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. | |
msw
2017/05/03 01:17:37
Could unit tests just use one of the above entries
khmel
2017/05/03 02:15:21
ARC test package name is defined here:
https://cs.
msw
2017/05/08 19:59:53
This is fine, at least for now, especially if the
khmel
2017/05/09 00:05:03
Acknowledged.
| |
98 {"fake.package.name1", "emfkafnhnpcmabnnkckkchdilgeoekbo"}, | |
msw
2017/05/03 01:17:37
The tests don't actually ever mention "fake.packag
khmel
2017/05/03 02:15:21
Replied above.
| |
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 Loading... | |
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 |
OLD | NEW |