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/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "ui/aura/client/activation_client.h" | 9 #include "ui/aura/client/activation_client.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 | 986 |
987 //////////////////////////////////////////////////////////////////////////////// | 987 //////////////////////////////////////////////////////////////////////////////// |
988 // DesktopNativeWidgetAura, aura::client::ActivationChangeObserver | 988 // DesktopNativeWidgetAura, aura::client::ActivationChangeObserver |
989 // implementation: | 989 // implementation: |
990 | 990 |
991 void DesktopNativeWidgetAura::OnWindowActivated(aura::Window* gained_active, | 991 void DesktopNativeWidgetAura::OnWindowActivated(aura::Window* gained_active, |
992 aura::Window* lost_active) { | 992 aura::Window* lost_active) { |
993 DCHECK(content_window_ == gained_active || content_window_ == lost_active); | 993 DCHECK(content_window_ == gained_active || content_window_ == lost_active); |
994 if ((content_window_ == gained_active || content_window_ == lost_active) && | 994 if ((content_window_ == gained_active || content_window_ == lost_active) && |
995 IsVisible() && GetWidget()->non_client_view()) { | 995 IsVisible() && GetWidget()->non_client_view()) { |
996 GetWidget()->non_client_view()->SchedulePaint(); | 996 GetWidget()->non_client_view()->frame_view()->SchedulePaint(); |
997 } | 997 } |
998 if (gained_active == content_window_ && restore_focus_on_activate_) { | 998 if (gained_active == content_window_ && restore_focus_on_activate_) { |
999 restore_focus_on_activate_ = false; | 999 restore_focus_on_activate_ = false; |
1000 GetWidget()->GetFocusManager()->RestoreFocusedView(); | 1000 GetWidget()->GetFocusManager()->RestoreFocusedView(); |
1001 } else if (lost_active == content_window_ && GetWidget()->HasFocusManager()) { | 1001 } else if (lost_active == content_window_ && GetWidget()->HasFocusManager()) { |
1002 DCHECK(!restore_focus_on_activate_); | 1002 DCHECK(!restore_focus_on_activate_); |
1003 restore_focus_on_activate_ = true; | 1003 restore_focus_on_activate_ = true; |
1004 // Pass in false so that ClearNativeFocus() isn't invoked. | 1004 // Pass in false so that ClearNativeFocus() isn't invoked. |
1005 GetWidget()->GetFocusManager()->StoreFocusedView(false); | 1005 GetWidget()->GetFocusManager()->StoreFocusedView(false); |
1006 } | 1006 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 input_method_event_filter_->SetInputMethodPropertyInRootWindow( | 1116 input_method_event_filter_->SetInputMethodPropertyInRootWindow( |
1117 root_window_->window()); | 1117 root_window_->window()); |
1118 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); | 1118 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); |
1119 } | 1119 } |
1120 | 1120 |
1121 void DesktopNativeWidgetAura::UpdateWindowTransparency() { | 1121 void DesktopNativeWidgetAura::UpdateWindowTransparency() { |
1122 content_window_->SetTransparent(ShouldUseNativeFrame()); | 1122 content_window_->SetTransparent(ShouldUseNativeFrame()); |
1123 } | 1123 } |
1124 | 1124 |
1125 } // namespace views | 1125 } // namespace views |
OLD | NEW |