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

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

Issue 8770011: aura: Ask the WindowDelegate before a Window is Focus()ed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years 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 | « ui/views/widget/native_widget_aura.h ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/drag_drop_client.h" 10 #include "ui/aura/client/drag_drop_client.h"
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 tooltip_manager_->UpdateForMouseEvent(mouse_event); 607 tooltip_manager_->UpdateForMouseEvent(mouse_event);
608 return delegate_->OnMouseEvent(mouse_event); 608 return delegate_->OnMouseEvent(mouse_event);
609 } 609 }
610 610
611 ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) { 611 ui::TouchStatus NativeWidgetAura::OnTouchEvent(aura::TouchEvent* event) {
612 DCHECK(window_->IsVisible()); 612 DCHECK(window_->IsVisible());
613 TouchEvent touch_event(event); 613 TouchEvent touch_event(event);
614 return delegate_->OnTouchEvent(touch_event); 614 return delegate_->OnTouchEvent(touch_event);
615 } 615 }
616 616
617 bool NativeWidgetAura::CanFocus() {
618 return true;
619 }
620
617 bool NativeWidgetAura::ShouldActivate(aura::Event* event) { 621 bool NativeWidgetAura::ShouldActivate(aura::Event* event) {
618 return can_activate_; 622 return can_activate_;
619 } 623 }
620 624
621 void NativeWidgetAura::OnActivated() { 625 void NativeWidgetAura::OnActivated() {
622 delegate_->OnNativeWidgetActivationChanged(true); 626 delegate_->OnNativeWidgetActivationChanged(true);
623 if (IsVisible() && GetWidget()->non_client_view()) 627 if (IsVisible() && GetWidget()->non_client_view())
624 GetWidget()->non_client_view()->SchedulePaint(); 628 GetWidget()->non_client_view()->SchedulePaint();
625 } 629 }
626 630
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 NOTIMPLEMENTED(); 771 NOTIMPLEMENTED();
768 } 772 }
769 773
770 // static 774 // static
771 bool NativeWidgetPrivate::IsMouseButtonDown() { 775 bool NativeWidgetPrivate::IsMouseButtonDown() {
772 return aura::Desktop::GetInstance()->IsMouseButtonDown(); 776 return aura::Desktop::GetInstance()->IsMouseButtonDown();
773 } 777 }
774 778
775 } // namespace internal 779 } // namespace internal
776 } // namespace views 780 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698