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

Unified Diff: chrome/browser/notifications/arc_application_notifier_source_chromeos.cc

Issue 2864243006: [Merge M59] arc: Prevent overwriting of the Chrome Play Store icon. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/arc_application_notifier_source_chromeos.cc
diff --git a/chrome/browser/notifications/arc_application_notifier_source_chromeos.cc b/chrome/browser/notifications/arc_application_notifier_source_chromeos.cc
index c9236d142e23a85b82299f909788b615f6d9e96d..16129583dcbd62afca286f8fa32f15dd283fdf6c 100644
--- a/chrome/browser/notifications/arc_application_notifier_source_chromeos.cc
+++ b/chrome/browser/notifications/arc_application_notifier_source_chromeos.cc
@@ -61,10 +61,12 @@ ArcApplicationNotifierSourceChromeOS::GetNotifierList(Profile* profile) {
kArcAppIconSizeInDp,
// The life time of icon must shorter than |this|.
this));
- icon->LoadForScaleFactor(
+ icon->image_skia().GetRepresentation(
ui::GetSupportedScaleFactor(display::Screen::GetScreen()
->GetPrimaryDisplay()
.device_scale_factor()));
+ // Apply icon now to set the default image.
+ OnIconUpdated(icon.get());
// Add notifiers.
package_to_app_ids_.insert(std::make_pair(app->package_name, app_id));
@@ -73,7 +75,7 @@ ArcApplicationNotifierSourceChromeOS::GetNotifierList(Profile* profile) {
std::unique_ptr<message_center::Notifier> notifier(
new message_center::Notifier(notifier_id, base::UTF8ToUTF16(app->name),
app->notifications_enabled));
- notifier->icon = icon->image();
+ notifier->icon = gfx::Image(icon->image_skia());
icons_.push_back(std::move(icon));
results.push_back(std::move(notifier));
}
@@ -117,7 +119,7 @@ void ArcApplicationNotifierSourceChromeOS::OnIconUpdated(ArcAppIcon* icon) {
observer_->OnIconImageUpdated(
message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
icon->app_id()),
- icon->image());
+ gfx::Image(icon->image_skia()));
}
void ArcApplicationNotifierSourceChromeOS::StopObserving() {
« no previous file with comments | « chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_icon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698