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

Side by Side Diff: ui/base/win/window_impl.cc

Issue 23596011: Set hbrBackground on wndclass, fixes white flash on resize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/win/window_impl.h" 5 #include "ui/base/win/window_impl.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 for (RegisteredClasses::const_iterator i = registered_classes_.begin(); 93 for (RegisteredClasses::const_iterator i = registered_classes_.begin();
94 i != registered_classes_.end(); ++i) { 94 i != registered_classes_.end(); ++i) {
95 if (class_info.Equals(i->info)) 95 if (class_info.Equals(i->info))
96 return i->atom; 96 return i->atom;
97 } 97 }
98 98
99 // No class found, need to register one. 99 // No class found, need to register one.
100 string16 name = string16(WindowImpl::kBaseClassName) + 100 string16 name = string16(WindowImpl::kBaseClassName) +
101 base::IntToString16(registered_count_++); 101 base::IntToString16(registered_count_++);
102 102
103 HBRUSH background = NULL; 103 HBRUSH background = reinterpret_cast<HBRUSH>(COLOR_WINDOW);
104 WNDCLASSEX window_class; 104 WNDCLASSEX window_class;
105 base::win::InitializeWindowClass( 105 base::win::InitializeWindowClass(
106 name.c_str(), 106 name.c_str(),
107 &base::win::WrappedWindowProc<WindowImpl::WndProc>, 107 &base::win::WrappedWindowProc<WindowImpl::WndProc>,
108 class_info.style, 108 class_info.style,
109 0, 109 0,
110 0, 110 0,
111 NULL, 111 NULL,
112 reinterpret_cast<HBRUSH>(background + 1), 112 reinterpret_cast<HBRUSH>(background + 1),
113 NULL, 113 NULL,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return window->OnWndProc(message, w_param, l_param); 265 return window->OnWndProc(message, w_param, l_param);
266 } 266 }
267 267
268 ATOM WindowImpl::GetWindowClassAtom() { 268 ATOM WindowImpl::GetWindowClassAtom() {
269 HICON icon = GetDefaultWindowIcon(); 269 HICON icon = GetDefaultWindowIcon();
270 ClassInfo class_info(initial_class_style(), icon); 270 ClassInfo class_info(initial_class_style(), icon);
271 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); 271 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info);
272 } 272 }
273 273
274 } // namespace ui 274 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698