| 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/strings/string_util.h" | 8 #include "base/strings/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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 | 966 |
| 967 //////////////////////////////////////////////////////////////////////////////// | 967 //////////////////////////////////////////////////////////////////////////////// |
| 968 // Widget, public: | 968 // Widget, public: |
| 969 | 969 |
| 970 // static | 970 // static |
| 971 void Widget::NotifyLocaleChanged() { | 971 void Widget::NotifyLocaleChanged() { |
| 972 // Deliberately not implemented. | 972 // Deliberately not implemented. |
| 973 } | 973 } |
| 974 | 974 |
| 975 namespace { | 975 namespace { |
| 976 #if defined(OS_WIN) || (defined(USE_X11) && !defined(OS_CHROMEOS)) |
| 976 void CloseWindow(aura::Window* window) { | 977 void CloseWindow(aura::Window* window) { |
| 977 if (window) { | 978 if (window) { |
| 978 Widget* widget = Widget::GetWidgetForNativeView(window); | 979 Widget* widget = Widget::GetWidgetForNativeView(window); |
| 979 if (widget && widget->is_secondary_widget()) | 980 if (widget && widget->is_secondary_widget()) |
| 980 // To avoid the delay in shutdown caused by using Close which may wait | 981 // To avoid the delay in shutdown caused by using Close which may wait |
| 981 // for animations, use CloseNow. Because this is only used on secondary | 982 // for animations, use CloseNow. Because this is only used on secondary |
| 982 // widgets it seems relatively safe to skip the extra processing of | 983 // widgets it seems relatively safe to skip the extra processing of |
| 983 // Close. | 984 // Close. |
| 984 widget->CloseNow(); | 985 widget->CloseNow(); |
| 985 } | 986 } |
| 986 } | 987 } |
| 988 #endif |
| 989 |
| 987 #if defined(OS_WIN) | 990 #if defined(OS_WIN) |
| 988 BOOL CALLBACK WindowCallbackProc(HWND hwnd, LPARAM lParam) { | 991 BOOL CALLBACK WindowCallbackProc(HWND hwnd, LPARAM lParam) { |
| 989 aura::Window* root_window = | 992 aura::Window* root_window = |
| 990 DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd); | 993 DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd); |
| 991 CloseWindow(root_window); | 994 CloseWindow(root_window); |
| 992 return TRUE; | 995 return TRUE; |
| 993 } | 996 } |
| 994 #endif | 997 #endif |
| 995 } // namespace | 998 } // namespace |
| 996 | 999 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 return aura::Env::GetInstance()->IsMouseButtonDown(); | 1139 return aura::Env::GetInstance()->IsMouseButtonDown(); |
| 1137 } | 1140 } |
| 1138 | 1141 |
| 1139 // static | 1142 // static |
| 1140 bool NativeWidgetPrivate::IsTouchDown() { | 1143 bool NativeWidgetPrivate::IsTouchDown() { |
| 1141 return aura::Env::GetInstance()->is_touch_down(); | 1144 return aura::Env::GetInstance()->is_touch_down(); |
| 1142 } | 1145 } |
| 1143 | 1146 |
| 1144 } // namespace internal | 1147 } // namespace internal |
| 1145 } // namespace views | 1148 } // namespace views |
| OLD | NEW |