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

Side by Side Diff: ui/views/widget/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
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/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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 void NativeWidgetAura::OnWindowActivated(aura::Window* gained_active, 871 void NativeWidgetAura::OnWindowActivated(aura::Window* gained_active,
872 aura::Window* lost_active) { 872 aura::Window* lost_active) {
873 DCHECK(window_ == gained_active || window_ == lost_active); 873 DCHECK(window_ == gained_active || window_ == lost_active);
874 if (GetWidget()->GetFocusManager()) { 874 if (GetWidget()->GetFocusManager()) {
875 if (window_ == gained_active) 875 if (window_ == gained_active)
876 GetWidget()->GetFocusManager()->RestoreFocusedView(); 876 GetWidget()->GetFocusManager()->RestoreFocusedView();
877 else if (window_ == lost_active) 877 else if (window_ == lost_active)
878 GetWidget()->GetFocusManager()->StoreFocusedView(true); 878 GetWidget()->GetFocusManager()->StoreFocusedView(true);
879 } 879 }
880 delegate_->OnNativeWidgetActivationChanged(window_ == gained_active); 880 delegate_->OnNativeWidgetActivationChanged(window_ == gained_active);
881 if (IsVisible() && GetWidget()->non_client_view())
882 GetWidget()->non_client_view()->SchedulePaint();
883 } 881 }
884 882
885 //////////////////////////////////////////////////////////////////////////////// 883 ////////////////////////////////////////////////////////////////////////////////
886 // NativeWidgetAura, aura::client::FocusChangeObserver: 884 // NativeWidgetAura, aura::client::FocusChangeObserver:
887 885
888 void NativeWidgetAura::OnWindowFocused(aura::Window* gained_focus, 886 void NativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
889 aura::Window* lost_focus) { 887 aura::Window* lost_focus) {
890 if (window_ == gained_focus) { 888 if (window_ == gained_focus) {
891 // In aura, it is possible for child native widgets to take input and focus, 889 // In aura, it is possible for child native widgets to take input and focus,
892 // this differs from the behavior on windows. 890 // this differs from the behavior on windows.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 return aura::Env::GetInstance()->IsMouseButtonDown(); 1141 return aura::Env::GetInstance()->IsMouseButtonDown();
1144 } 1142 }
1145 1143
1146 // static 1144 // static
1147 bool NativeWidgetPrivate::IsTouchDown() { 1145 bool NativeWidgetPrivate::IsTouchDown() {
1148 return aura::Env::GetInstance()->is_touch_down(); 1146 return aura::Env::GetInstance()->is_touch_down();
1149 } 1147 }
1150 1148
1151 } // namespace internal 1149 } // namespace internal
1152 } // namespace views 1150 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698