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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 64853004: Use high resolution icons where possible for streamlined hosted app icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_experiment_create_app_from_page
Patch Set: rework, add tests Created 7 years, 1 month 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/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 4f9586905ce7eaa2885e50acd1cb06532590001f..76ccd9eae9951782a5aec0bb00d5ea4a3a3fbd90 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -116,6 +116,7 @@
#include "ui/events/event_utils.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
+#include "ui/gfx/icon_util.h"
#include "ui/gfx/sys_color_change_listener.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/single_split_view.h"
@@ -1573,8 +1574,14 @@ gfx::ImageSkia BrowserView::GetWindowAppIcon() {
}
gfx::ImageSkia BrowserView::GetWindowIcon() {
- if (browser_->is_app() || browser_->is_type_popup())
- return browser_->GetCurrentPageIcon().AsImageSkia();
+ if (browser_->is_app() || browser_->is_type_popup()) {
benwells 2013/11/13 21:55:17 It seems strange that the hosted app tab helper is
calamity 2013/11/15 04:25:50 According to https://code.google.com/p/chromium/is
+ // Use IconUtil::kMediumIconSize as it is the size used for the Alt+Tab
+ // icon.
+ const gfx::Image* icon =
+ browser_->GetCurrentPageIcon(IconUtil::kMediumIconSize);
+ if (icon)
+ return icon->AsImageSkia();
+ }
return gfx::ImageSkia();
}

Powered by Google App Engine
This is Rietveld 408576698