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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 13770008: Fix dcheck on win aura shutdown, use CloseNow to close secondary widgets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 7 years, 8 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 | « no previous file | no next file » | 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/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/activation_client.h" 10 #include "ui/aura/client/activation_client.h"
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 } 896 }
897 897
898 #if defined(OS_WIN) 898 #if defined(OS_WIN)
899 namespace { 899 namespace {
900 BOOL CALLBACK WindowCallbackProc(HWND hwnd, LPARAM lParam) { 900 BOOL CALLBACK WindowCallbackProc(HWND hwnd, LPARAM lParam) {
901 aura::Window* root_window = 901 aura::Window* root_window =
902 DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd); 902 DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd);
903 if (root_window) { 903 if (root_window) {
904 Widget* widget = Widget::GetWidgetForNativeView(root_window); 904 Widget* widget = Widget::GetWidgetForNativeView(root_window);
905 if (widget && widget->is_secondary_widget()) 905 if (widget && widget->is_secondary_widget())
906 widget->Close(); 906 // To avoid the delay in shutdown caused by using Close which may wait
907 // for animations, use CloseNow. Because this is only used on secondary
908 // widgets it seems relatively safe to skip the extra processing of
909 // Close.
910 widget->CloseNow();
907 } 911 }
908 return TRUE; 912 return TRUE;
909 } 913 }
910 } // namespace 914 } // namespace
911 #endif 915 #endif
912 916
913 // static 917 // static
914 void Widget::CloseAllSecondaryWidgets() { 918 void Widget::CloseAllSecondaryWidgets() {
915 #if defined(OS_WIN) 919 #if defined(OS_WIN)
916 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); 920 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 return aura::Env::GetInstance()->is_mouse_button_down(); 1035 return aura::Env::GetInstance()->is_mouse_button_down();
1032 } 1036 }
1033 1037
1034 // static 1038 // static
1035 bool NativeWidgetPrivate::IsTouchDown() { 1039 bool NativeWidgetPrivate::IsTouchDown() {
1036 return aura::Env::GetInstance()->is_touch_down(); 1040 return aura::Env::GetInstance()->is_touch_down();
1037 } 1041 }
1038 1042
1039 } // namespace internal 1043 } // namespace internal
1040 } // namespace views 1044 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698