| 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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 base::IntToString16(registered_count_++); | 128 base::IntToString16(registered_count_++); |
| 129 | 129 |
| 130 WNDCLASSEX window_class; | 130 WNDCLASSEX window_class; |
| 131 base::win::InitializeWindowClass( | 131 base::win::InitializeWindowClass( |
| 132 name.c_str(), &base::win::WrappedWindowProc<WindowImpl::WndProc>, | 132 name.c_str(), &base::win::WrappedWindowProc<WindowImpl::WndProc>, |
| 133 class_info.style, 0, 0, NULL, | 133 class_info.style, 0, 0, NULL, |
| 134 reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)), NULL, | 134 reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH)), NULL, |
| 135 class_info.icon, class_info.small_icon, &window_class); | 135 class_info.icon, class_info.small_icon, &window_class); |
| 136 HMODULE instance = window_class.hInstance; | 136 HMODULE instance = window_class.hInstance; |
| 137 ATOM atom = RegisterClassEx(&window_class); | 137 ATOM atom = RegisterClassEx(&window_class); |
| 138 CHECK(atom) << GetLastError(); | 138 CHECK(atom); |
| 139 | 139 |
| 140 registered_classes_.push_back(RegisteredClass( | 140 registered_classes_.push_back(RegisteredClass( |
| 141 class_info, name, atom, instance)); | 141 class_info, name, atom, instance)); |
| 142 | 142 |
| 143 return atom; | 143 return atom; |
| 144 } | 144 } |
| 145 | 145 |
| 146 ClassRegistrar::RegisteredClass::RegisteredClass(const ClassInfo& info, | 146 ClassRegistrar::RegisteredClass::RegisteredClass(const ClassInfo& info, |
| 147 const base::string16& name, | 147 const base::string16& name, |
| 148 ATOM atom, | 148 ATOM atom, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 | 304 |
| 305 ATOM WindowImpl::GetWindowClassAtom() { | 305 ATOM WindowImpl::GetWindowClassAtom() { |
| 306 HICON icon = GetDefaultWindowIcon(); | 306 HICON icon = GetDefaultWindowIcon(); |
| 307 HICON small_icon = GetSmallWindowIcon(); | 307 HICON small_icon = GetSmallWindowIcon(); |
| 308 ClassInfo class_info(initial_class_style(), icon, small_icon); | 308 ClassInfo class_info(initial_class_style(), icon, small_icon); |
| 309 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); | 309 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace gfx | 312 } // namespace gfx |
| OLD | NEW |