Commit 6e2e384b authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev Committed by Commit Bot

Update bundled Chrome app icon for MD compliance

- Update chrome_app manifest to support 32 and 192px icons.
- Use 192px icon as window icon for Chrome browser.
- Move all resource handing related to chrome_app under
  OS_CHROMEOS ifdef.

Bug: 879618
Test: manual
Change-Id: If3e9fb396424159ea0bf7f2cf61febfd89838b62
Reviewed-on: https://chromium-review.googlesource.com/1210943
Commit-Queue: Vladislav Kaznacheev <kaznacheev@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589771}
parent 1c2342ac
......@@ -40,6 +40,10 @@
<if expr="not is_macosx and not is_win">
<include name="IDR_STATUS_TRAY_ICON" file="google_chrome/product_logo_22.png" type="BINDATA" />
</if>
<if expr="chromeos">
<include name="IDR_CHROME_APP_ICON_32" file="google_chrome/chromeos/chrome_app_icon_32.png" type="BINDATA" />
<include name="IDR_CHROME_APP_ICON_192" file="google_chrome/chromeos/chrome_app_icon_192.png" type="BINDATA" />
</if>
</if>
<if expr="not _google_chrome">
<include name="IDR_PRODUCT_LOGO_64" file="chromium/product_logo_64.png" type="BINDATA" />
......@@ -54,6 +58,10 @@
<if expr="not is_macosx and not is_win">
<include name="IDR_STATUS_TRAY_ICON" file="chromium/product_logo_22.png" type="BINDATA" />
</if>
<if expr="chromeos">
<include name="IDR_CHROME_APP_ICON_32" file="chromium/chromeos/chrome_app_icon_32.png" type="BINDATA" />
<include name="IDR_CHROME_APP_ICON_192" file="chromium/chromeos/chrome_app_icon_192.png" type="BINDATA" />
</if>
</if>
<if expr="is_win">
<!-- Double-size profile avatar images used for generating .ico
......
......@@ -27,9 +27,9 @@ ChromeComponentExtensionResourceManager() {
static const GritResourceMap kExtraComponentExtensionResources[] = {
{"web_store/webstore_icon_128.png", IDR_WEBSTORE_ICON},
{"web_store/webstore_icon_16.png", IDR_WEBSTORE_ICON_16},
{"chrome_app/product_logo_128.png", IDR_PRODUCT_LOGO_128},
{"chrome_app/product_logo_16.png", IDR_PRODUCT_LOGO_16},
#if defined(OS_CHROMEOS)
{"chrome_app/chrome_app_icon_32.png", IDR_CHROME_APP_ICON_32},
{"chrome_app/chrome_app_icon_192.png", IDR_CHROME_APP_ICON_192},
{"webstore_widget/app/icons/icon_16.png", IDR_WEBSTORE_ICON_16},
{"webstore_widget/app/icons/icon_32.png", IDR_WEBSTORE_ICON_32},
{"webstore_widget/app/icons/icon_128.png", IDR_WEBSTORE_ICON},
......
......@@ -4,8 +4,8 @@
"version": "0.1",
"description": "Chrome as an app",
"icons": {
"16": "product_logo_16.png",
"128": "product_logo_128.png"
"32": "chrome_app_icon_32.png",
"192": "chrome_app_icon_192.png"
},
"app": {
"launch": {
......
......@@ -61,6 +61,7 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/web_applications/components/web_app_helpers.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/chrome_unscaled_resources.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
......@@ -1053,7 +1054,7 @@ void ChromeLauncherController::CreateBrowserShortcutLauncherItem() {
browser_shortcut.type = ash::TYPE_BROWSER_SHORTCUT;
browser_shortcut.id = ash::ShelfID(kChromeAppId);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
browser_shortcut.image = *rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_32);
browser_shortcut.image = *rb.GetImageSkiaNamed(IDR_CHROME_APP_ICON_192);
browser_shortcut.title = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
std::unique_ptr<BrowserShortcutLauncherItemController> item_delegate =
std::make_unique<BrowserShortcutLauncherItemController>(model_);
......
......@@ -162,6 +162,7 @@
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/ash/window_properties.h"
#include "chrome/browser/ui/views/location_bar/intent_picker_view.h"
#include "chrome/grit/chrome_unscaled_resources.h"
#else
#include "chrome/browser/ui/signin_view_controller.h"
#include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
......@@ -1929,7 +1930,7 @@ gfx::ImageSkia BrowserView::GetWindowIcon() {
#if defined(OS_CHROMEOS)
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
if (browser_->is_type_tabbed()) {
return rb.GetImageNamed(IDR_PRODUCT_LOGO_32).AsImageSkia();
return rb.GetImageNamed(IDR_CHROME_APP_ICON_192).AsImageSkia();
}
auto* window = GetNativeWindow();
int override_window_icon_resource_id =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment