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

Side by Side Diff: base/window_impl.cc

Issue 169015: Make NativeControl inherit from base::WindowImpl instead of CWindowImpl to re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « base/window_impl.h ('k') | views/controls/native_control.cc » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « base/window_impl.h ('k') | views/controls/native_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698