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

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

Issue 132473007: aura: Destroy the compositor before destroying the backing window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: destroy-window: 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
229 // Handle the message if it's in our message map; otherwise, let the system 233 // Handle the message if it's in our message map; otherwise, let the system
230 // handle it. 234 // handle it.
231 if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result)) 235 if (!ProcessWindowMessage(hwnd, message, w_param, l_param, result))
232 result = DefWindowProc(hwnd_, message, w_param, l_param); 236 result = DefWindowProc(hwnd, message, w_param, l_param);
233 237
234 return result; 238 return result;
235 } 239 }
236 240
237 void WindowImpl::ClearUserData() { 241 void WindowImpl::ClearUserData() {
238 if (::IsWindow(hwnd_)) 242 if (::IsWindow(hwnd_))
239 gfx::SetWindowUserData(hwnd_, NULL); 243 gfx::SetWindowUserData(hwnd_, NULL);
240 } 244 }
241 245
242 // static 246 // static
(...skipping 20 matching lines...) Expand all
263 return window->OnWndProc(message, w_param, l_param); 267 return window->OnWndProc(message, w_param, l_param);
264 } 268 }
265 269
266 ATOM WindowImpl::GetWindowClassAtom() { 270 ATOM WindowImpl::GetWindowClassAtom() {
267 HICON icon = GetDefaultWindowIcon(); 271 HICON icon = GetDefaultWindowIcon();
268 ClassInfo class_info(initial_class_style(), icon); 272 ClassInfo class_info(initial_class_style(), icon);
269 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); 273 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info);
270 } 274 }
271 275
272 } // namespace gfx 276 } // 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