Commit 5b11e3db authored by tapted@chromium.org's avatar tapted@chromium.org

Update App Launcher icons, splitting for Chromium, Chrome, Canary.

More binaries at http://go/chromerev/7719014/ .

theme/app_list.ico                      | Bin 43766 -> 0 bytes
theme/chromium/app_list.ico             | Bin 0 -> 26489 bytes
theme/chromium/app_list_48.png          | Bin 0 -> 1142 bytes
theme/default_100_percent/win/app_list.png | Bin 1279 -> 0 bytes

src-internal binaries: http://go/viewvc/chrome-internal?view=rev&revision=36431
src-internal DEPS roll: http://go/viewvc/chrome-internal?view=rev&revision=36446

BUG=180700
TEST=official Chrome installer built and icons checked with and without --chrome-sxs.
App Launcher enabled via chrome://flags to verify icons used in taskbar.

Review URL: https://codereview.chromium.org/13947002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195449 0039d316-1c4b-4281-b951-d872f2087c98
parent 16696476
...@@ -30,7 +30,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US ...@@ -30,7 +30,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
IDI_APP_HOST_MAIN ICON "..\\..\\chrome\\app\\theme\\app_list.ico" #if defined(GOOGLE_CHROME_BUILD)
IDI_APP_HOST_MAIN ICON "..\\..\\chrome\\app\\theme\\google_chrome\\app_list.ico"
#else
IDI_APP_HOST_MAIN ICON "..\\..\\chrome\\app\\theme\\chromium\\app_list.ico"
#endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
......
...@@ -46,11 +46,17 @@ IDR_SXS ICON "theme\google_chrome\chrome_sxs. ...@@ -46,11 +46,17 @@ IDR_SXS ICON "theme\google_chrome\chrome_sxs.
#else #else
IDR_MAINFRAME ICON "theme\chromium\chromium.ico" IDR_MAINFRAME ICON "theme\chromium\chromium.ico"
#endif #endif
// Icon for the App Lancher. Named with a leading X to keep the name // Icon for the App Lancher. Named with a leading X to keep the name
// alphabetically after IDR_SXS. // alphabetically after IDR_SXS.
// The SXS icon must have an index of 5 for Chrome and 1 for Chromium, these #if defined(GOOGLE_CHROME_BUILD)
// constants are used in Chrome code to identify it. // The App Launcher icon must have an index of 5 in Chrome, and 6 for SXS.
IDR_X_APP_LIST ICON "theme\\app_list.ico" IDR_X_APP_LIST ICON "theme\\google_chrome\\app_list.ico"
IDR_X_APP_LIST_SXS ICON "theme\\google_chrome\\app_list_sxs.ico"
#else
// The App Launcher icon must have an index of 1 for Chromium.
IDR_X_APP_LIST ICON "theme\\chromium\\app_list.ico"
#endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
......
...@@ -40,8 +40,12 @@ ...@@ -40,8 +40,12 @@
<structure type="chrome_scaled_image" name="IDR_ALLOWED_JAVASCRIPT" file="allowed_script.png" /> <structure type="chrome_scaled_image" name="IDR_ALLOWED_JAVASCRIPT" file="allowed_script.png" />
<structure type="chrome_scaled_image" name="IDR_APP_DEFAULT_ICON" file="app_default_icon.png" /> <structure type="chrome_scaled_image" name="IDR_APP_DEFAULT_ICON" file="app_default_icon.png" />
<structure type="chrome_scaled_image" name="IDR_APP_DROPARROW" file="app_droparrow.png" /> <structure type="chrome_scaled_image" name="IDR_APP_DROPARROW" file="app_droparrow.png" />
<if expr="pp_ifdef('enable_app_list') and is_win"> <if expr="pp_ifdef('enable_app_list') and is_win and not pp_ifdef('_google_chrome')">
<structure type="chrome_scaled_image" name="IDR_APP_LIST" file="win/app_list.png" /> <structure type="chrome_scaled_image" name="IDR_APP_LIST" file="chromium/app_list_48.png" />
</if>
<if expr="pp_ifdef('enable_app_list') and is_win and pp_ifdef('_google_chrome')">
<structure type="chrome_scaled_image" name="IDR_APP_LIST" file="google_chrome/app_list_48.png" />
<structure type="chrome_scaled_image" name="IDR_APP_LIST_SXS" file="google_chrome/app_list_sxs_48.png" />
</if> </if>
<if expr="pp_ifdef('enable_app_list') and not pp_ifdef('chromeos')"> <if expr="pp_ifdef('enable_app_list') and not pp_ifdef('chromeos')">
<structure type="chrome_scaled_image" name="IDR_APP_LIST_TAB_OVERLAY" file="win/app_list_v1_overlay.png" /> <structure type="chrome_scaled_image" name="IDR_APP_LIST_TAB_OVERLAY" file="win/app_list_v1_overlay.png" />
......
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/app_list/app_list_service_win.h"
#include "grit/theme_resources.h"
#if defined(GOOGLE_CHROME_BUILD)
#include "chrome/installer/util/install_util.h"
#endif
namespace chrome {
int GetAppListIconResourceId() {
int icon_id = IDR_APP_LIST;
#if defined(GOOGLE_CHROME_BUILD)
if (InstallUtil::IsChromeSxSProcess())
icon_id = IDR_APP_LIST_SXS;
#endif
return icon_id;
}
} // namespace chrome
...@@ -11,6 +11,10 @@ namespace chrome { ...@@ -11,6 +11,10 @@ namespace chrome {
AppListService* GetAppListServiceWin(); AppListService* GetAppListServiceWin();
// Returns the resource id of the app list PNG icon used for the taskbar,
// infobars and window decorations.
int GetAppListIconResourceId();
} // namespace chrome } // namespace chrome
#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_WIN_H_ #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_WIN_H_
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "base/prefs/pref_service.h" #include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_service_win.h"
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/browser_window.h"
...@@ -20,7 +21,6 @@ ...@@ -20,7 +21,6 @@
#include "content/public/common/url_constants.h" #include "content/public/common/url_constants.h"
#include "grit/generated_resources.h" #include "grit/generated_resources.h"
#include "grit/google_chrome_strings.h" #include "grit/google_chrome_strings.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "win8/util/win8_util.h" #include "win8/util/win8_util.h"
...@@ -71,7 +71,8 @@ AppMetroInfoBarDelegateWin::AppMetroInfoBarDelegateWin( ...@@ -71,7 +71,8 @@ AppMetroInfoBarDelegateWin::AppMetroInfoBarDelegateWin(
AppMetroInfoBarDelegateWin::~AppMetroInfoBarDelegateWin() {} AppMetroInfoBarDelegateWin::~AppMetroInfoBarDelegateWin() {}
gfx::Image* AppMetroInfoBarDelegateWin::GetIcon() const { gfx::Image* AppMetroInfoBarDelegateWin::GetIcon() const {
return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(IDR_APP_LIST); return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
chrome::GetAppListIconResourceId());
} }
string16 AppMetroInfoBarDelegateWin::GetMessageText() const { string16 AppMetroInfoBarDelegateWin::GetMessageText() const {
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#include "grit/chromium_strings.h" #include "grit/chromium_strings.h"
#include "grit/generated_resources.h" #include "grit/generated_resources.h"
#include "grit/google_chrome_strings.h" #include "grit/google_chrome_strings.h"
#include "grit/theme_resources.h"
#include "ui/app_list/pagination_model.h" #include "ui/app_list/pagination_model.h"
#include "ui/app_list/views/app_list_view.h" #include "ui/app_list/views/app_list_view.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
...@@ -61,6 +60,10 @@ ...@@ -61,6 +60,10 @@
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
#include "win8/util/win8_util.h" #include "win8/util/win8_util.h"
#if defined(GOOGLE_CHROME_BUILD)
#include "chrome/installer/util/install_util.h"
#endif
#if defined(USE_AURA) #if defined(USE_AURA)
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
...@@ -76,16 +79,24 @@ static const int kAnchorOffset = 25; ...@@ -76,16 +79,24 @@ static const int kAnchorOffset = 25;
static const wchar_t kTrayClassName[] = L"Shell_TrayWnd"; static const wchar_t kTrayClassName[] = L"Shell_TrayWnd";
// Icons are added to the resources of the DLL using icon names. The icon index // Icons are added to the resources of the DLL using icon names. The icon index
// for the app list icon is named IDR_X_APP_LIST. Creating shortcuts needs to // for the app list icon is named IDR_X_APP_LIST or (for official builds)
// specify a resource index, which are different to icon names. They are 0 // IDR_X_APP_LIST_SXS for Chrome Canary. Creating shortcuts needs to specify a
// based and contiguous. As Google Chrome builds have extra icons the icon for // resource index, which are different to icon names. They are 0 based and
// Google Chrome builds need to be higher. Unfortunately these indexes are not // contiguous. As Google Chrome builds have extra icons the icon for Google
// in any generated header file. // Chrome builds need to be higher. Unfortunately these indexes are not in any
// generated header file.
int GetAppListIconIndex() {
const int kAppListIconIndex = 5;
const int kAppListIconIndexSxS = 6;
const int kAppListIconIndexChromium = 1;
#if defined(GOOGLE_CHROME_BUILD) #if defined(GOOGLE_CHROME_BUILD)
const int kAppListIconIndex = 5; if (InstallUtil::IsChromeSxSProcess())
return kAppListIconIndexSxS;
return kAppListIconIndex;
#else #else
const int kAppListIconIndex = 1; return kAppListIconIndexChromium;
#endif #endif
}
CommandLine GetAppListCommandLine() { CommandLine GetAppListCommandLine() {
const char* const kSwitchesToCopy[] = { switches::kUserDataDir }; const char* const kSwitchesToCopy[] = { switches::kUserDataDir };
...@@ -172,7 +183,7 @@ void CreateAppListShortcuts( ...@@ -172,7 +183,7 @@ void CreateAppListShortcuts(
shortcut_properties.set_arguments(wide_switches); shortcut_properties.set_arguments(wide_switches);
shortcut_properties.set_description( shortcut_properties.set_description(
l10n_util::GetStringUTF16(IDS_APP_LIST_SHORTCUT_NAME)); l10n_util::GetStringUTF16(IDS_APP_LIST_SHORTCUT_NAME));
shortcut_properties.set_icon(chrome_exe, kAppListIconIndex); shortcut_properties.set_icon(chrome_exe, GetAppListIconIndex());
shortcut_properties.set_app_id(app_model_id); shortcut_properties.set_app_id(app_model_id);
const string16 file_name = const string16 file_name =
...@@ -408,7 +419,7 @@ gfx::NativeWindow AppListControllerDelegateWin::GetAppListWindow() { ...@@ -408,7 +419,7 @@ gfx::NativeWindow AppListControllerDelegateWin::GetAppListWindow() {
gfx::ImageSkia AppListControllerDelegateWin::GetWindowIcon() { gfx::ImageSkia AppListControllerDelegateWin::GetWindowIcon() {
gfx::ImageSkia* resource = ResourceBundle::GetSharedInstance(). gfx::ImageSkia* resource = ResourceBundle::GetSharedInstance().
GetImageSkiaNamed(IDR_APP_LIST); GetImageSkiaNamed(chrome::GetAppListIconResourceId());
return *resource; return *resource;
} }
...@@ -801,7 +812,7 @@ string16 AppListController::GetAppListIconPath() { ...@@ -801,7 +812,7 @@ string16 AppListController::GetAppListIconPath() {
} }
std::stringstream ss; std::stringstream ss;
ss << "," << kAppListIconIndex; ss << "," << GetAppListIconIndex();
string16 result = icon_path.value(); string16 result = icon_path.value();
result.append(UTF8ToUTF16(ss.str())); result.append(UTF8ToUTF16(ss.str()));
return result; return result;
......
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
'browser/ui/app_list/app_list_service_disabled.h', 'browser/ui/app_list/app_list_service_disabled.h',
'browser/ui/app_list/app_list_service_mac.h', 'browser/ui/app_list/app_list_service_mac.h',
'browser/ui/app_list/app_list_service_selector.cc', 'browser/ui/app_list/app_list_service_selector.cc',
'browser/ui/app_list/app_list_service_win.cc',
'browser/ui/app_list/app_list_service_win.h', 'browser/ui/app_list/app_list_service_win.h',
'browser/ui/app_list/app_list_view_delegate.cc', 'browser/ui/app_list/app_list_view_delegate.cc',
'browser/ui/app_list/app_list_view_delegate.h', 'browser/ui/app_list/app_list_view_delegate.h',
......
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