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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 9702072: Second try for (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/test/test_activation_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index b93f0ff08bc6011d943d73ffcbebec1a0a19ec21..67dfecf137252c6bf55f1807bfb2887302e9c389 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -773,14 +773,16 @@ bool NativeWidgetAura::ShouldActivate(aura::Event* event) {
}
void NativeWidgetAura::OnActivated() {
- GetWidget()->GetFocusManager()->RestoreFocusedView();
+ if (GetWidget()->HasFocusManager())
+ GetWidget()->GetFocusManager()->RestoreFocusedView();
delegate_->OnNativeWidgetActivationChanged(true);
if (IsVisible() && GetWidget()->non_client_view())
GetWidget()->non_client_view()->SchedulePaint();
}
void NativeWidgetAura::OnLostActive() {
- GetWidget()->GetFocusManager()->StoreFocusedView();
+ if (GetWidget()->HasFocusManager())
+ GetWidget()->GetFocusManager()->StoreFocusedView();
delegate_->OnNativeWidgetActivationChanged(false);
if (IsVisible() && GetWidget()->non_client_view())
GetWidget()->non_client_view()->SchedulePaint();
« no previous file with comments | « ui/aura/test/test_activation_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698