| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <list> | 5 #include <list> | 
| 6 | 6 | 
| 7 #include "base/singleton.h" | 7 #include "base/singleton.h" | 
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" | 
| 9 #include "base/window_impl.h" | 9 #include "base/window_impl.h" | 
| 10 #include "base/win_util.h" | 10 #include "base/win_util.h" | 
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 148 HICON WindowImpl::GetDefaultWindowIcon() const { | 148 HICON WindowImpl::GetDefaultWindowIcon() const { | 
| 149   return NULL; | 149   return NULL; | 
| 150 } | 150 } | 
| 151 | 151 | 
| 152 LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) { | 152 LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) { | 
| 153   LRESULT result = 0; | 153   LRESULT result = 0; | 
| 154 | 154 | 
| 155   // Handle the message if it's in our message map; otherwise, let the system | 155   // Handle the message if it's in our message map; otherwise, let the system | 
| 156   // handle it. | 156   // handle it. | 
| 157   if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result)) | 157   if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result)) | 
| 158     result = DefWindowProc(hwnd_, message, w_param, l_param); | 158       result = DefWindowProc(hwnd_, message, w_param, l_param); | 
|  | 159 | 
|  | 160   if (message == WM_NCDESTROY) { | 
|  | 161     // Notify the subclass that this is the last message before the window | 
|  | 162     // is destroyed. | 
|  | 163     OnFinalMessage(hwnd_); | 
|  | 164     hwnd_ = NULL; | 
|  | 165   } | 
| 159 | 166 | 
| 160   return result; | 167   return result; | 
| 161 } | 168 } | 
| 162 | 169 | 
| 163 // static | 170 // static | 
| 164 LRESULT CALLBACK WindowImpl::WndProc(HWND hwnd, | 171 LRESULT CALLBACK WindowImpl::WndProc(HWND hwnd, | 
| 165                                      UINT message, | 172                                      UINT message, | 
| 166                                      WPARAM w_param, | 173                                      WPARAM w_param, | 
| 167                                      LPARAM l_param) { | 174                                      LPARAM l_param) { | 
| 168   if (message == WM_NCCREATE) { | 175   if (message == WM_NCCREATE) { | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 204   class_ex.hIconSm = class_ex.hIcon; | 211   class_ex.hIconSm = class_ex.hIcon; | 
| 205   ATOM atom = RegisterClassEx(&class_ex); | 212   ATOM atom = RegisterClassEx(&class_ex); | 
| 206   DCHECK(atom); | 213   DCHECK(atom); | 
| 207 | 214 | 
| 208   Singleton<ClassRegistrar>()->RegisterClass(class_info, name, atom); | 215   Singleton<ClassRegistrar>()->RegisterClass(class_info, name, atom); | 
| 209 | 216 | 
| 210   return name; | 217   return name; | 
| 211 } | 218 } | 
| 212 | 219 | 
| 213 }  // namespace base | 220 }  // namespace base | 
| OLD | NEW | 
|---|