diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-09 01:18:15 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-09 01:18:15 +0000 |
commit | e724cb43e666972363380de0f6eba349160ac28c (patch) | |
tree | a6624020ce21fcfe3756f845c0b103ac94c602ff /chrome/views/window.cc | |
parent | 5982bb05e7c927b6384785ae84970ade1b73912a (diff) | |
download | chromium_src-e724cb43e666972363380de0f6eba349160ac28c.zip chromium_src-e724cb43e666972363380de0f6eba349160ac28c.tar.gz chromium_src-e724cb43e666972363380de0f6eba349160ac28c.tar.bz2 |
Allow the window icon to be shown in the task bar, Alt+Tab etc.
B=1031854
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/window.cc')
-rw-r--r-- | chrome/views/window.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/views/window.cc b/chrome/views/window.cc index 086c69b..66f3f93 100644 --- a/chrome/views/window.cc +++ b/chrome/views/window.cc @@ -32,6 +32,7 @@ #include "chrome/app/chrome_dll_resource.h" // TODO(beng): some day make this unfortunate dependency not exist. #include "chrome/browser/browser_list.h" +#include "chrome/common/gfx/icon_util.h" #include "chrome/common/l10n_util.h" #include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" @@ -182,6 +183,17 @@ void Window::UpdateWindowTitle() { SetWindowText(GetHWND(), window_title.c_str()); } +void Window::UpdateWindowIcon() { + SkBitmap icon = window_delegate_->GetWindowIcon(); + if (!icon.isNull()) { + HICON windows_icon = IconUtil::CreateHICONFromSkBitmap(icon); + SendMessage(GetHWND(), WM_SETICON, ICON_SMALL, + reinterpret_cast<LPARAM>(windows_icon)); + SendMessage(GetHWND(), WM_SETICON, ICON_BIG, + reinterpret_cast<LPARAM>(windows_icon)); + } +} + // static bool Window::SaveWindowPositionToPrefService(PrefService* pref_service, const std::wstring& entry, |