OLD | NEW |
---|---|
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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
775 } | 775 } |
776 | 776 |
777 void NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { | 777 void NativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { |
778 DCHECK(window_->IsVisible()); | 778 DCHECK(window_->IsVisible()); |
779 if (event->type() == ui::ET_MOUSEWHEEL) { | 779 if (event->type() == ui::ET_MOUSEWHEEL) { |
780 delegate_->OnMouseEvent(event); | 780 delegate_->OnMouseEvent(event); |
781 if (event->handled()) | 781 if (event->handled()) |
782 return; | 782 return; |
783 } | 783 } |
784 | 784 |
785 if (event->type() == ui::ET_MOUSE_RELEASED) | |
786 GetWidget()->GetInputMethod()->OnPossibleRefocus(); | |
SteveT
2013/07/31 03:19:18
Handling "refocus" here and below.
| |
787 | |
785 if (tooltip_manager_.get()) | 788 if (tooltip_manager_.get()) |
786 tooltip_manager_->UpdateTooltip(); | 789 tooltip_manager_->UpdateTooltip(); |
787 delegate_->OnMouseEvent(event); | 790 delegate_->OnMouseEvent(event); |
788 } | 791 } |
789 | 792 |
790 void NativeWidgetAura::OnScrollEvent(ui::ScrollEvent* event) { | 793 void NativeWidgetAura::OnScrollEvent(ui::ScrollEvent* event) { |
791 delegate_->OnScrollEvent(event); | 794 delegate_->OnScrollEvent(event); |
792 } | 795 } |
793 | 796 |
794 void NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { | 797 void NativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { |
795 DCHECK(window_->IsVisible()); | 798 DCHECK(window_->IsVisible()); |
799 | |
800 if (event->type() == ui::ET_TOUCH_RELEASED) | |
801 GetWidget()->GetInputMethod()->OnPossibleRefocus(); | |
802 | |
796 delegate_->OnTouchEvent(event); | 803 delegate_->OnTouchEvent(event); |
797 } | 804 } |
798 | 805 |
799 void NativeWidgetAura::OnGestureEvent(ui::GestureEvent* event) { | 806 void NativeWidgetAura::OnGestureEvent(ui::GestureEvent* event) { |
800 DCHECK(window_->IsVisible()); | 807 DCHECK(window_->IsVisible()); |
801 delegate_->OnGestureEvent(event); | 808 delegate_->OnGestureEvent(event); |
802 } | 809 } |
803 | 810 |
804 //////////////////////////////////////////////////////////////////////////////// | 811 //////////////////////////////////////////////////////////////////////////////// |
805 // NativeWidgetAura, aura::client::ActivationDelegate implementation: | 812 // NativeWidgetAura, aura::client::ActivationDelegate implementation: |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1069 return aura::Env::GetInstance()->is_mouse_button_down(); | 1076 return aura::Env::GetInstance()->is_mouse_button_down(); |
1070 } | 1077 } |
1071 | 1078 |
1072 // static | 1079 // static |
1073 bool NativeWidgetPrivate::IsTouchDown() { | 1080 bool NativeWidgetPrivate::IsTouchDown() { |
1074 return aura::Env::GetInstance()->is_touch_down(); | 1081 return aura::Env::GetInstance()->is_touch_down(); |
1075 } | 1082 } |
1076 | 1083 |
1077 } // namespace internal | 1084 } // namespace internal |
1078 } // namespace views | 1085 } // namespace views |
OLD | NEW |