| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 ATOM ClassRegistrar::RetrieveClassAtom(const ClassInfo& class_info) { | 91 ATOM ClassRegistrar::RetrieveClassAtom(const ClassInfo& class_info) { |
| 92 base::AutoLock auto_lock(lock_); | 92 base::AutoLock auto_lock(lock_); |
| 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 base::string16 name = base::string16(WindowImpl::kBaseClassName) + |
| 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, |
| (...skipping 152 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 |