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

Unified Diff: ui/base/win/window_impl.cc

Issue 10059001: Merge 131673 - Make WindowImpl take into account the icon in the class registrar. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 months 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
« no previous file with comments | « ui/base/win/window_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/window_impl.cc
===================================================================
--- ui/base/win/window_impl.cc (revision 131755)
+++ ui/base/win/window_impl.cc (working copy)
@@ -29,15 +29,15 @@
// WindowImpl class information used for registering unique windows.
struct ClassInfo {
UINT style;
- HBRUSH background;
+ HICON icon;
- explicit ClassInfo(int style)
+ ClassInfo(int style, HICON icon)
: style(style),
- background(NULL) {}
+ icon(icon) {}
// Compares two ClassInfos. Returns true if all members match.
bool Equals(const ClassInfo& other) const {
- return (other.style == style && other.background == background);
+ return (other.style == style && other.icon == icon);
}
};
@@ -197,14 +197,14 @@
}
std::wstring WindowImpl::GetWindowClassName() {
- ClassInfo class_info(initial_class_style());
+ HICON icon = GetDefaultWindowIcon();
+ ClassInfo class_info(initial_class_style(), icon);
std::wstring name;
if (ClassRegistrar::GetInstance()->RetrieveClassName(class_info, &name))
return name;
- HICON icon = GetDefaultWindowIcon();
-
// No class found, need to register one.
+ HBRUSH background = NULL;
WNDCLASSEX class_ex = {
sizeof(WNDCLASSEX),
class_info.style,
@@ -214,7 +214,7 @@
NULL,
icon,
NULL,
- reinterpret_cast<HBRUSH>(class_info.background + 1),
+ reinterpret_cast<HBRUSH>(background + 1),
NULL,
name.c_str(),
icon
« no previous file with comments | « ui/base/win/window_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698