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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 | 964 |
965 void NativeWidgetAura::SetInitialFocus() { | 965 void NativeWidgetAura::SetInitialFocus() { |
966 // The window does not get keyboard messages unless we focus it. | 966 // The window does not get keyboard messages unless we focus it. |
967 if (!GetWidget()->SetInitialFocus()) | 967 if (!GetWidget()->SetInitialFocus()) |
968 window_->Focus(); | 968 window_->Focus(); |
969 } | 969 } |
970 | 970 |
971 //////////////////////////////////////////////////////////////////////////////// | 971 //////////////////////////////////////////////////////////////////////////////// |
972 // Widget, public: | 972 // Widget, public: |
973 | 973 |
974 // static | |
975 void Widget::NotifyLocaleChanged() { | |
976 // Deliberately not implemented. | |
977 } | |
978 | |
979 namespace { | 974 namespace { |
980 #if defined(OS_WIN) || (defined(USE_X11) && !defined(OS_CHROMEOS)) | 975 #if defined(OS_WIN) || (defined(USE_X11) && !defined(OS_CHROMEOS)) |
981 void CloseWindow(aura::Window* window) { | 976 void CloseWindow(aura::Window* window) { |
982 if (window) { | 977 if (window) { |
983 Widget* widget = Widget::GetWidgetForNativeView(window); | 978 Widget* widget = Widget::GetWidgetForNativeView(window); |
984 if (widget && widget->is_secondary_widget()) | 979 if (widget && widget->is_secondary_widget()) |
985 // To avoid the delay in shutdown caused by using Close which may wait | 980 // To avoid the delay in shutdown caused by using Close which may wait |
986 // for animations, use CloseNow. Because this is only used on secondary | 981 // for animations, use CloseNow. Because this is only used on secondary |
987 // widgets it seems relatively safe to skip the extra processing of | 982 // widgets it seems relatively safe to skip the extra processing of |
988 // Close. | 983 // Close. |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 return aura::Env::GetInstance()->IsMouseButtonDown(); | 1138 return aura::Env::GetInstance()->IsMouseButtonDown(); |
1144 } | 1139 } |
1145 | 1140 |
1146 // static | 1141 // static |
1147 bool NativeWidgetPrivate::IsTouchDown() { | 1142 bool NativeWidgetPrivate::IsTouchDown() { |
1148 return aura::Env::GetInstance()->is_touch_down(); | 1143 return aura::Env::GetInstance()->is_touch_down(); |
1149 } | 1144 } |
1150 | 1145 |
1151 } // namespace internal | 1146 } // namespace internal |
1152 } // namespace views | 1147 } // namespace views |
OLD | NEW |