OLD | NEW |
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/gfx/win/window_impl.h" | 5 #include "ui/gfx/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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 base::IntToString16(registered_count_++); | 101 base::IntToString16(registered_count_++); |
102 | 102 |
103 WNDCLASSEX window_class; | 103 WNDCLASSEX window_class; |
104 base::win::InitializeWindowClass( | 104 base::win::InitializeWindowClass( |
105 name.c_str(), | 105 name.c_str(), |
106 &base::win::WrappedWindowProc<WindowImpl::WndProc>, | 106 &base::win::WrappedWindowProc<WindowImpl::WndProc>, |
107 class_info.style, | 107 class_info.style, |
108 0, | 108 0, |
109 0, | 109 0, |
110 NULL, | 110 NULL, |
111 NULL, | 111 reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)), |
112 NULL, | 112 NULL, |
113 class_info.icon, | 113 class_info.icon, |
114 class_info.icon, | 114 class_info.icon, |
115 &window_class); | 115 &window_class); |
116 HMODULE instance = window_class.hInstance; | 116 HMODULE instance = window_class.hInstance; |
117 ATOM atom = RegisterClassEx(&window_class); | 117 ATOM atom = RegisterClassEx(&window_class); |
118 CHECK(atom) << GetLastError(); | 118 CHECK(atom) << GetLastError(); |
119 | 119 |
120 registered_classes_.push_back(RegisteredClass(class_info, atom)); | 120 registered_classes_.push_back(RegisteredClass(class_info, atom)); |
121 | 121 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 return window->OnWndProc(message, w_param, l_param); | 263 return window->OnWndProc(message, w_param, l_param); |
264 } | 264 } |
265 | 265 |
266 ATOM WindowImpl::GetWindowClassAtom() { | 266 ATOM WindowImpl::GetWindowClassAtom() { |
267 HICON icon = GetDefaultWindowIcon(); | 267 HICON icon = GetDefaultWindowIcon(); |
268 ClassInfo class_info(initial_class_style(), icon); | 268 ClassInfo class_info(initial_class_style(), icon); |
269 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); | 269 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); |
270 } | 270 } |
271 | 271 |
272 } // namespace gfx | 272 } // namespace gfx |
OLD | NEW |