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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 9406031: Makes it so the launcher only gets focus when using the keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/shell.cc ('k') | no next file » | 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/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/string_util.h" 8 #include "base/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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 758 }
759 759
760 void NativeWidgetAura::OnWindowVisibilityChanged(bool visible) { 760 void NativeWidgetAura::OnWindowVisibilityChanged(bool visible) {
761 delegate_->OnNativeWidgetVisibilityChanged(visible); 761 delegate_->OnNativeWidgetVisibilityChanged(visible);
762 } 762 }
763 763
764 //////////////////////////////////////////////////////////////////////////////// 764 ////////////////////////////////////////////////////////////////////////////////
765 // NativeWidgetAura, aura::ActivationDelegate implementation: 765 // NativeWidgetAura, aura::ActivationDelegate implementation:
766 766
767 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { 767 bool NativeWidgetAura::ShouldActivate(aura::Event* event) {
768 return can_activate_; 768 return can_activate_ && delegate_->CanActivate();
Ben Goodger (Google) 2012/02/16 02:57:43 I don't think this can work... did you test this?
769 } 769 }
770 770
771 void NativeWidgetAura::OnActivated() { 771 void NativeWidgetAura::OnActivated() {
772 GetWidget()->GetFocusManager()->RestoreFocusedView(); 772 GetWidget()->GetFocusManager()->RestoreFocusedView();
773 delegate_->OnNativeWidgetActivationChanged(true); 773 delegate_->OnNativeWidgetActivationChanged(true);
774 if (IsVisible() && GetWidget()->non_client_view()) 774 if (IsVisible() && GetWidget()->non_client_view())
775 GetWidget()->non_client_view()->SchedulePaint(); 775 GetWidget()->non_client_view()->SchedulePaint();
776 } 776 }
777 777
778 void NativeWidgetAura::OnLostActive() { 778 void NativeWidgetAura::OnLostActive() {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 } 914 }
915 } 915 }
916 916
917 // static 917 // static
918 bool NativeWidgetPrivate::IsMouseButtonDown() { 918 bool NativeWidgetPrivate::IsMouseButtonDown() {
919 return aura::RootWindow::GetInstance()->IsMouseButtonDown(); 919 return aura::RootWindow::GetInstance()->IsMouseButtonDown();
920 } 920 }
921 921
922 } // namespace internal 922 } // namespace internal
923 } // namespace views 923 } // namespace views
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698