| 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/widget.h" | 5 #include "ui/views/widget/widget.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 MenuController* menu_controller = MenuController::GetActiveInstance(); | 934 MenuController* menu_controller = MenuController::GetActiveInstance(); |
| 935 if (menu_controller) | 935 if (menu_controller) |
| 936 menu_controller->OnWidgetActivationChanged(); | 936 menu_controller->OnWidgetActivationChanged(); |
| 937 #endif // defined(OS_CHROMEOS) | 937 #endif // defined(OS_CHROMEOS) |
| 938 } | 938 } |
| 939 | 939 |
| 940 FOR_EACH_OBSERVER(Observer, observers_, | 940 FOR_EACH_OBSERVER(Observer, observers_, |
| 941 OnWidgetActivationChanged(this, active)); | 941 OnWidgetActivationChanged(this, active)); |
| 942 } | 942 } |
| 943 | 943 |
| 944 void Widget::OnNativeFocus(gfx::NativeView focused_view) { | 944 void Widget::OnNativeFocus(gfx::NativeView old_focused_view) { |
| 945 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(focused_view, | 945 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(old_focused_view, |
| 946 GetNativeView()); | 946 GetNativeView()); |
| 947 } | 947 } |
| 948 | 948 |
| 949 void Widget::OnNativeBlur(gfx::NativeView focused_view) { | 949 void Widget::OnNativeBlur(gfx::NativeView new_focused_view) { |
| 950 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(GetNativeView(), | 950 WidgetFocusManager::GetInstance()->OnWidgetFocusEvent(GetNativeView(), |
| 951 focused_view); | 951 new_focused_view); |
| 952 } | 952 } |
| 953 | 953 |
| 954 void Widget::OnNativeWidgetVisibilityChanged(bool visible) { | 954 void Widget::OnNativeWidgetVisibilityChanged(bool visible) { |
| 955 View* root = GetRootView(); | 955 View* root = GetRootView(); |
| 956 root->PropagateVisibilityNotifications(root, visible); | 956 root->PropagateVisibilityNotifications(root, visible); |
| 957 FOR_EACH_OBSERVER(Observer, observers_, | 957 FOR_EACH_OBSERVER(Observer, observers_, |
| 958 OnWidgetVisibilityChanged(this, visible)); | 958 OnWidgetVisibilityChanged(this, visible)); |
| 959 if (GetCompositor() && root->layer()) | 959 if (GetCompositor() && root->layer()) |
| 960 root->layer()->SetVisible(visible); | 960 root->layer()->SetVisible(visible); |
| 961 } | 961 } |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 | 1335 |
| 1336 //////////////////////////////////////////////////////////////////////////////// | 1336 //////////////////////////////////////////////////////////////////////////////// |
| 1337 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1337 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1338 | 1338 |
| 1339 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1339 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1340 return this; | 1340 return this; |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 } // namespace internal | 1343 } // namespace internal |
| 1344 } // namespace views | 1344 } // namespace views |
| OLD | NEW |