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 |