Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 99553008: Fix regression where the active window header was not used for apps on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/custom_frame_view_ash.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 return can_activate_ && native_widget_delegate_->CanActivate(); 984 return can_activate_ && native_widget_delegate_->CanActivate();
985 } 985 }
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) &&
995 IsVisible() && GetWidget()->non_client_view()) {
996 GetWidget()->non_client_view()->SchedulePaint();
997 }
998 if (gained_active == content_window_ && restore_focus_on_activate_) { 994 if (gained_active == content_window_ && restore_focus_on_activate_) {
999 restore_focus_on_activate_ = false; 995 restore_focus_on_activate_ = false;
1000 GetWidget()->GetFocusManager()->RestoreFocusedView(); 996 GetWidget()->GetFocusManager()->RestoreFocusedView();
1001 } else if (lost_active == content_window_ && GetWidget()->HasFocusManager()) { 997 } else if (lost_active == content_window_ && GetWidget()->HasFocusManager()) {
1002 DCHECK(!restore_focus_on_activate_); 998 DCHECK(!restore_focus_on_activate_);
1003 restore_focus_on_activate_ = true; 999 restore_focus_on_activate_ = true;
1004 // Pass in false so that ClearNativeFocus() isn't invoked. 1000 // Pass in false so that ClearNativeFocus() isn't invoked.
1005 GetWidget()->GetFocusManager()->StoreFocusedView(false); 1001 GetWidget()->GetFocusManager()->StoreFocusedView(false);
1006 } 1002 }
1007 } 1003 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 input_method_event_filter_->SetInputMethodPropertyInRootWindow( 1112 input_method_event_filter_->SetInputMethodPropertyInRootWindow(
1117 root_window_->window()); 1113 root_window_->window());
1118 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); 1114 root_window_event_filter_->AddHandler(input_method_event_filter_.get());
1119 } 1115 }
1120 1116
1121 void DesktopNativeWidgetAura::UpdateWindowTransparency() { 1117 void DesktopNativeWidgetAura::UpdateWindowTransparency() {
1122 content_window_->SetTransparent(ShouldUseNativeFrame()); 1118 content_window_->SetTransparent(ShouldUseNativeFrame());
1123 } 1119 }
1124 1120
1125 } // namespace views 1121 } // namespace views
OLDNEW
« no previous file with comments | « ash/wm/custom_frame_view_ash.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698