summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 21:47:49 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 21:47:49 +0000
commit75cf085b056a041258b6bf39301d92c3cb992a66 (patch)
treec08916df0a35d7fc3b5be892727934de4882ab82
parentdb57d47b93d1bd4a7388a503b3e09856029396c0 (diff)
downloadchromium_src-75cf085b056a041258b6bf39301d92c3cb992a66.zip
chromium_src-75cf085b056a041258b6bf39301d92c3cb992a66.tar.gz
chromium_src-75cf085b056a041258b6bf39301d92c3cb992a66.tar.bz2
Fix the chrome app icon on windows
(and also the icon for the default plugin window). MSVS's resource compiler can only compile resources of the same type from a single .rc file, so we can't have ICON types scattered across rc files. This change moves all the icon files out of theme_resources.rc and puts them in chrome_dll.rc. This worked in the past because these were different dlls. This has the side benefit of not including the ico files in the linux/mac builds. BUG=26600 Review URL: http://codereview.chromium.org/361031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31131 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/chrome_dll.rc30
-rw-r--r--chrome/app/chrome_dll_resource.h25
-rw-r--r--chrome/app/theme/theme_resources.grd24
-rw-r--r--chrome/browser/views/chrome_views_delegate.cc3
-rw-r--r--chrome/browser/views/frame/glass_browser_frame_view.cc3
5 files changed, 58 insertions, 27 deletions
diff --git a/chrome/app/chrome_dll.rc b/chrome/app/chrome_dll.rc
index 5a26df5..e9355a9 100644
--- a/chrome/app/chrome_dll.rc
+++ b/chrome/app/chrome_dll.rc
@@ -169,7 +169,7 @@ END
/////////////////////////////////////////////////////////////////////////////
//
-// Icon
+// Icons
//
// This is duplicated from the .exe file to make ATL happy (it tries to load
// the icon from the current module). We can perhaps work around this in the
@@ -181,6 +181,34 @@ IDR_MAINFRAME ICON "theme\google_chrome\chrome.ico"
IDR_MAINFRAME ICON "theme\chromium\chromium.ico"
#endif
+// We include these resources because all ICON types need to be in the
+// same .rc file. See:
+// http://www.technewsgroups.net/group/microsoft.public.dotnet.general/topic2111.aspx
+IDI_THROBBER_01 ICON "theme\vista_frame_throbber_01.ico"
+IDI_THROBBER_02 ICON "theme\vista_frame_throbber_02.ico"
+IDI_THROBBER_03 ICON "theme\vista_frame_throbber_03.ico"
+IDI_THROBBER_04 ICON "theme\vista_frame_throbber_04.ico"
+IDI_THROBBER_05 ICON "theme\vista_frame_throbber_05.ico"
+IDI_THROBBER_06 ICON "theme\vista_frame_throbber_06.ico"
+IDI_THROBBER_07 ICON "theme\vista_frame_throbber_07.ico"
+IDI_THROBBER_08 ICON "theme\vista_frame_throbber_08.ico"
+IDI_THROBBER_09 ICON "theme\vista_frame_throbber_09.ico"
+IDI_THROBBER_10 ICON "theme\vista_frame_throbber_10.ico"
+IDI_THROBBER_11 ICON "theme\vista_frame_throbber_11.ico"
+IDI_THROBBER_12 ICON "theme\vista_frame_throbber_12.ico"
+IDI_THROBBER_13 ICON "theme\vista_frame_throbber_13.ico"
+IDI_THROBBER_14 ICON "theme\vista_frame_throbber_14.ico"
+IDI_THROBBER_15 ICON "theme\vista_frame_throbber_15.ico"
+IDI_THROBBER_16 ICON "theme\vista_frame_throbber_16.ico"
+IDI_THROBBER_17 ICON "theme\vista_frame_throbber_17.ico"
+IDI_THROBBER_18 ICON "theme\vista_frame_throbber_18.ico"
+IDI_THROBBER_19 ICON "theme\vista_frame_throbber_19.ico"
+IDI_THROBBER_20 ICON "theme\vista_frame_throbber_20.ico"
+IDI_THROBBER_21 ICON "theme\vista_frame_throbber_21.ico"
+IDI_THROBBER_22 ICON "theme\vista_frame_throbber_22.ico"
+IDI_THROBBER_23 ICON "theme\vista_frame_throbber_23.ico"
+IDI_THROBBER_24 ICON "theme\vista_frame_throbber_24.ico"
+
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
diff --git a/chrome/app/chrome_dll_resource.h b/chrome/app/chrome_dll_resource.h
index 810968b..40c50c1 100644
--- a/chrome/app/chrome_dll_resource.h
+++ b/chrome/app/chrome_dll_resource.h
@@ -8,6 +8,31 @@
#define IDR_MAINFRAME 101
+#define IDI_THROBBER_01 102
+#define IDI_THROBBER_02 103
+#define IDI_THROBBER_03 104
+#define IDI_THROBBER_04 105
+#define IDI_THROBBER_05 106
+#define IDI_THROBBER_06 107
+#define IDI_THROBBER_07 108
+#define IDI_THROBBER_08 109
+#define IDI_THROBBER_09 110
+#define IDI_THROBBER_10 111
+#define IDI_THROBBER_11 112
+#define IDI_THROBBER_12 113
+#define IDI_THROBBER_13 114
+#define IDI_THROBBER_14 115
+#define IDI_THROBBER_15 116
+#define IDI_THROBBER_16 117
+#define IDI_THROBBER_17 118
+#define IDI_THROBBER_18 119
+#define IDI_THROBBER_19 120
+#define IDI_THROBBER_20 121
+#define IDI_THROBBER_21 122
+#define IDI_THROBBER_22 123
+#define IDI_THROBBER_23 124
+#define IDI_THROBBER_24 125
+
// Values around 1600 are used by installer/setup/build/
#define IDD_IPC_SETTINGS 3000
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index 1be7e73..a3ce0e5 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -118,30 +118,6 @@
<include name="IDR_APP_DROPARROW" file="app_droparrow.png" type="BINDATA" />
<include name="IDR_LOCK" file="lock_small.png" type="BINDATA" />
<include name="IDR_WARNING" file="alert_small.png" type="BINDATA" />
- <include name="IDR_THROBBER_01" file="vista_frame_throbber_01.ico" type="ICON" />
- <include name="IDR_THROBBER_02" file="vista_frame_throbber_02.ico" type="ICON" />
- <include name="IDR_THROBBER_03" file="vista_frame_throbber_03.ico" type="ICON" />
- <include name="IDR_THROBBER_04" file="vista_frame_throbber_04.ico" type="ICON" />
- <include name="IDR_THROBBER_05" file="vista_frame_throbber_05.ico" type="ICON" />
- <include name="IDR_THROBBER_06" file="vista_frame_throbber_06.ico" type="ICON" />
- <include name="IDR_THROBBER_07" file="vista_frame_throbber_07.ico" type="ICON" />
- <include name="IDR_THROBBER_08" file="vista_frame_throbber_08.ico" type="ICON" />
- <include name="IDR_THROBBER_09" file="vista_frame_throbber_09.ico" type="ICON" />
- <include name="IDR_THROBBER_10" file="vista_frame_throbber_10.ico" type="ICON" />
- <include name="IDR_THROBBER_11" file="vista_frame_throbber_11.ico" type="ICON" />
- <include name="IDR_THROBBER_12" file="vista_frame_throbber_12.ico" type="ICON" />
- <include name="IDR_THROBBER_13" file="vista_frame_throbber_13.ico" type="ICON" />
- <include name="IDR_THROBBER_14" file="vista_frame_throbber_14.ico" type="ICON" />
- <include name="IDR_THROBBER_15" file="vista_frame_throbber_15.ico" type="ICON" />
- <include name="IDR_THROBBER_16" file="vista_frame_throbber_16.ico" type="ICON" />
- <include name="IDR_THROBBER_17" file="vista_frame_throbber_17.ico" type="ICON" />
- <include name="IDR_THROBBER_18" file="vista_frame_throbber_18.ico" type="ICON" />
- <include name="IDR_THROBBER_19" file="vista_frame_throbber_19.ico" type="ICON" />
- <include name="IDR_THROBBER_20" file="vista_frame_throbber_20.ico" type="ICON" />
- <include name="IDR_THROBBER_21" file="vista_frame_throbber_21.ico" type="ICON" />
- <include name="IDR_THROBBER_22" file="vista_frame_throbber_22.ico" type="ICON" />
- <include name="IDR_THROBBER_23" file="vista_frame_throbber_23.ico" type="ICON" />
- <include name="IDR_THROBBER_24" file="vista_frame_throbber_24.ico" type="ICON" />
<include name="IDR_STOP" file="stop.png" type="BINDATA" />
<include name="IDR_STOP_NOBORDER" file="stop_noborder.png" type="BINDATA" />
<include name="IDR_STOP_NOBORDER_CENTER" file="stop_noborder_center.png" type="BINDATA" />
diff --git a/chrome/browser/views/chrome_views_delegate.cc b/chrome/browser/views/chrome_views_delegate.cc
index f7d33b9..ce0e975 100644
--- a/chrome/browser/views/chrome_views_delegate.cc
+++ b/chrome/browser/views/chrome_views_delegate.cc
@@ -10,6 +10,7 @@
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/window_sizer.h"
+#include "chrome/common/chrome_constants.h"
#include "chrome/common/pref_service.h"
///////////////////////////////////////////////////////////////////////////////
@@ -76,7 +77,7 @@ bool ChromeViewsDelegate::GetSavedMaximizedState(
#if defined(OS_WIN)
HICON ChromeViewsDelegate::GetDefaultWindowIcon() const {
- return LoadIcon(GetModuleHandle(L"chrome.dll"),
+ return LoadIcon(GetModuleHandle(chrome::kBrowserResourcesDll),
MAKEINTRESOURCE(IDR_MAINFRAME));
}
#endif
diff --git a/chrome/browser/views/frame/glass_browser_frame_view.cc b/chrome/browser/views/frame/glass_browser_frame_view.cc
index a765416..6c61526 100644
--- a/chrome/browser/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/views/frame/glass_browser_frame_view.cc
@@ -7,6 +7,7 @@
#include "app/gfx/canvas.h"
#include "app/resource_bundle.h"
#include "app/theme_provider.h"
+#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/browser_theme_provider.h"
#include "chrome/browser/views/frame/browser_view.h"
#include "chrome/browser/views/tabs/tab_strip_wrapper.h"
@@ -429,7 +430,7 @@ void GlassBrowserFrameView::InitThrobberIcons() {
if (!initialized) {
ResourceBundle &rb = ResourceBundle::GetSharedInstance();
for (int i = 0; i < kThrobberIconCount; ++i) {
- throbber_icons_[i] = rb.LoadThemeIcon(IDR_THROBBER_01 + i);
+ throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i);
DCHECK(throbber_icons_[i]);
}
initialized = true;