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

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: compile 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
« no previous file with comments | « ui/gfx/win/window_impl.h ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_win.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) 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 if (!destroyed) 213 if (!destroyed)
214 destroyed_ = NULL; 214 destroyed_ = NULL;
215 215
216 CheckWindowCreated(hwnd_); 216 CheckWindowCreated(hwnd_);
217 217
218 // The window procedure should have set the data for us. 218 // The window procedure should have set the data for us.
219 CHECK_EQ(this, GetWindowUserData(hwnd)); 219 CHECK_EQ(this, GetWindowUserData(hwnd));
220 } 220 }
221 221
222 void WindowImpl::SetDestroyed() { hwnd_ = NULL; }
Ben Goodger (Google) 2014/01/15 19:16:20 sorry to continue to nitpick this, but could you d
danakj 2014/01/15 19:23:52 I see, OK done. I set hwnd_ to NULL after calling
223
222 HICON WindowImpl::GetDefaultWindowIcon() const { 224 HICON WindowImpl::GetDefaultWindowIcon() const {
223 return NULL; 225 return NULL;
224 } 226 }
225 227
226 LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) { 228 LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) {
227 LRESULT result = 0; 229 LRESULT result = 0;
228 230
229 // Handle the message if it's in our message map; otherwise, let the system 231 // Handle the message if it's in our message map; otherwise, let the system
230 // handle it. 232 // handle it.
231 if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result)) 233 if (!ProcessWindowMessage(hwnd_, message, w_param, l_param, result))
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 return window->OnWndProc(message, w_param, l_param); 265 return window->OnWndProc(message, w_param, l_param);
264 } 266 }
265 267
266 ATOM WindowImpl::GetWindowClassAtom() { 268 ATOM WindowImpl::GetWindowClassAtom() {
267 HICON icon = GetDefaultWindowIcon(); 269 HICON icon = GetDefaultWindowIcon();
268 ClassInfo class_info(initial_class_style(), icon); 270 ClassInfo class_info(initial_class_style(), icon);
269 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); 271 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info);
270 } 272 }
271 273
272 } // namespace gfx 274 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/win/window_impl.h ('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