OLD | NEW |
---|---|
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 Loading... | |
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 widget->CloseNow(); |
sky
2013/04/08 19:52:05
Add a comment here as to why this is OK.
| |
907 } | 907 } |
908 return TRUE; | 908 return TRUE; |
909 } | 909 } |
910 } // namespace | 910 } // namespace |
911 #endif | 911 #endif |
912 | 912 |
913 // static | 913 // static |
914 void Widget::CloseAllSecondaryWidgets() { | 914 void Widget::CloseAllSecondaryWidgets() { |
915 #if defined(OS_WIN) | 915 #if defined(OS_WIN) |
916 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); | 916 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1031 return aura::Env::GetInstance()->is_mouse_button_down(); | 1031 return aura::Env::GetInstance()->is_mouse_button_down(); |
1032 } | 1032 } |
1033 | 1033 |
1034 // static | 1034 // static |
1035 bool NativeWidgetPrivate::IsTouchDown() { | 1035 bool NativeWidgetPrivate::IsTouchDown() { |
1036 return aura::Env::GetInstance()->is_touch_down(); | 1036 return aura::Env::GetInstance()->is_touch_down(); |
1037 } | 1037 } |
1038 | 1038 |
1039 } // namespace internal | 1039 } // namespace internal |
1040 } // namespace views | 1040 } // namespace views |
OLD | NEW |