| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |