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

Side by Side Diff: ui/views/win/hwnd_message_handler.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: windows 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/views/win/hwnd_message_handler.h" 5 #include "ui/views/win/hwnd_message_handler.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 } 445 }
446 } 446 }
447 447
448 void HWNDMessageHandler::CloseNow() { 448 void HWNDMessageHandler::CloseNow() {
449 // We may already have been destroyed if the selection resulted in a tab 449 // We may already have been destroyed if the selection resulted in a tab
450 // switch which will have reactivated the browser window and closed us, so 450 // switch which will have reactivated the browser window and closed us, so
451 // we need to check to see if we're still a window before trying to destroy 451 // we need to check to see if we're still a window before trying to destroy
452 // ourself. 452 // ourself.
453 waiting_for_close_now_ = false; 453 waiting_for_close_now_ = false;
454 if (IsWindow(hwnd())) 454 if (IsWindow(hwnd()))
455 DestroyWindow(hwnd()); 455 Destroy();
Ben Goodger (Google) 2014/01/14 21:48:03 this line should remain unchanged with the changes
danakj 2014/01/14 21:58:41 Done.
456 } 456 }
457 457
458 gfx::Rect HWNDMessageHandler::GetWindowBoundsInScreen() const { 458 gfx::Rect HWNDMessageHandler::GetWindowBoundsInScreen() const {
459 RECT r; 459 RECT r;
460 GetWindowRect(hwnd(), &r); 460 GetWindowRect(hwnd(), &r);
461 return gfx::Rect(r); 461 return gfx::Rect(r);
462 } 462 }
463 463
464 gfx::Rect HWNDMessageHandler::GetClientAreaBoundsInScreen() const { 464 gfx::Rect HWNDMessageHandler::GetClientAreaBoundsInScreen() const {
465 RECT r; 465 RECT r;
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 SetMsgHandled(FALSE); 2255 SetMsgHandled(FALSE);
2256 } 2256 }
2257 2257
2258 void HWNDMessageHandler::HandleTouchEvents(const TouchEvents& touch_events) { 2258 void HWNDMessageHandler::HandleTouchEvents(const TouchEvents& touch_events) {
2259 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr()); 2259 base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr());
2260 for (size_t i = 0; i < touch_events.size() && ref; ++i) 2260 for (size_t i = 0; i < touch_events.size() && ref; ++i)
2261 delegate_->HandleTouchEvent(touch_events[i]); 2261 delegate_->HandleTouchEvent(touch_events[i]);
2262 } 2262 }
2263 2263
2264 } // namespace views 2264 } // namespace views
OLDNEW
« ui/gfx/win/window_impl.cc ('K') | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698