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

Side by Side Diff: ui/gfx/win/window_impl.cc

Issue 137783029: Revert 245586 "aura: Destroy the compositor before destroying th..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1794/src/
Patch Set: Created 6 years, 11 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
OLDNEW
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 CHECK_EQ(this, GetWindowUserData(hwnd)); 219 CHECK_EQ(this, GetWindowUserData(hwnd));
220 } 220 }
221 221
222 HICON WindowImpl::GetDefaultWindowIcon() const { 222 HICON WindowImpl::GetDefaultWindowIcon() const {
223 return NULL; 223 return NULL;
224 } 224 }
225 225
226 LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) { 226 LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) {
227 LRESULT result = 0; 227 LRESULT result = 0;
228 228
229 HWND hwnd = hwnd_;
230 if (message == WM_NCDESTROY)
231 hwnd_ = NULL;
232
233 // Handle the message if it's in our message map; otherwise, let the system 229 // Handle the message if it's in our message map; otherwise, let the system
234 // handle it. 230 // handle it.
235 if (!ProcessWindowMessage(hwnd, message, w_param, l_param, result)) 231 if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result))
236 result = DefWindowProc(hwnd, message, w_param, l_param); 232 result = DefWindowProc(hwnd_, message, w_param, l_param);
237 233
238 return result; 234 return result;
239 } 235 }
240 236
241 void WindowImpl::ClearUserData() { 237 void WindowImpl::ClearUserData() {
242 if (::IsWindow(hwnd_)) 238 if (::IsWindow(hwnd_))
243 gfx::SetWindowUserData(hwnd_, NULL); 239 gfx::SetWindowUserData(hwnd_, NULL);
244 } 240 }
245 241
246 // static 242 // static
(...skipping 20 matching lines...) Expand all
267 return window->OnWndProc(message, w_param, l_param); 263 return window->OnWndProc(message, w_param, l_param);
268 } 264 }
269 265
270 ATOM WindowImpl::GetWindowClassAtom() { 266 ATOM WindowImpl::GetWindowClassAtom() {
271 HICON icon = GetDefaultWindowIcon(); 267 HICON icon = GetDefaultWindowIcon();
272 ClassInfo class_info(initial_class_style(), icon); 268 ClassInfo class_info(initial_class_style(), icon);
273 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); 269 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info);
274 } 270 }
275 271
276 } // namespace gfx 272 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host.cc ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698