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

Unified Diff: extensions/browser/app_window/app_window.cc

Issue 2804623004: arc: Restore Chrome badging for apps that have peer in Android apps. (Closed)
Patch Set: minor updates Created 3 years, 8 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
« no previous file with comments | « extensions/browser/app_window/app_window.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/app_window/app_window.cc
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc
index 6d52ad22e934d4cd93892d50f5f57a97cc8d0a75..83f074837d326c19ee786454c0841d36990ac2fc 100644
--- a/extensions/browser/app_window/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -561,6 +561,10 @@ base::string16 AppWindow::GetTitle() const {
return title;
}
+bool AppWindow::HasCustomIcon() const {
+ return window_icon_url_.is_valid() || app_icon_url_.is_valid();
+}
+
void AppWindow::SetAppIconUrl(const GURL& url) {
// Avoid using any previous icons that were being downloaded.
image_loader_ptr_factory_.InvalidateWeakPtrs();
@@ -595,7 +599,8 @@ void AppWindow::UpdateAppIcon(const gfx::Image& image) {
// Set the showInShelf=true window icon and add the app_icon_image_
// as a badge. If the image is empty, set the default app icon placeholder
// as the base image.
- if (window_icon_url_.is_valid() && !app_icon_image_->image().IsEmpty()) {
+ if (window_icon_url_.is_valid() && app_icon_image_ &&
+ !app_icon_image_->image().IsEmpty()) {
gfx::Image base_image =
!image.IsEmpty()
? image
« no previous file with comments | « extensions/browser/app_window/app_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698