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/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_change_observer.h" | 10 #include "ui/aura/client/activation_change_observer.h" |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 628 |
629 void NativeWidgetAura::SetVisibilityChangedAnimationsEnabled(bool value) { | 629 void NativeWidgetAura::SetVisibilityChangedAnimationsEnabled(bool value) { |
630 window_->SetProperty(aura::client::kAnimationsDisabledKey, !value); | 630 window_->SetProperty(aura::client::kAnimationsDisabledKey, !value); |
631 } | 631 } |
632 | 632 |
633 //////////////////////////////////////////////////////////////////////////////// | 633 //////////////////////////////////////////////////////////////////////////////// |
634 // NativeWidgetAura, views::InputMethodDelegate implementation: | 634 // NativeWidgetAura, views::InputMethodDelegate implementation: |
635 | 635 |
636 void NativeWidgetAura::DispatchKeyEventPostIME(const ui::KeyEvent& key) { | 636 void NativeWidgetAura::DispatchKeyEventPostIME(const ui::KeyEvent& key) { |
637 FocusManager* focus_manager = GetWidget()->GetFocusManager(); | 637 FocusManager* focus_manager = GetWidget()->GetFocusManager(); |
638 if (focus_manager) | |
639 focus_manager->MaybeResetMenuKeyState(key); | |
640 if (delegate_->OnKeyEvent(key) || !focus_manager) | 638 if (delegate_->OnKeyEvent(key) || !focus_manager) |
641 return; | 639 return; |
642 focus_manager->OnKeyEvent(key); | 640 focus_manager->OnKeyEvent(key); |
643 } | 641 } |
644 | 642 |
645 //////////////////////////////////////////////////////////////////////////////// | 643 //////////////////////////////////////////////////////////////////////////////// |
646 // NativeWidgetAura, aura::WindowDelegate implementation: | 644 // NativeWidgetAura, aura::WindowDelegate implementation: |
647 | 645 |
648 gfx::Size NativeWidgetAura::GetMinimumSize() const { | 646 gfx::Size NativeWidgetAura::GetMinimumSize() const { |
649 return delegate_->GetMinimumSize(); | 647 return delegate_->GetMinimumSize(); |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 return aura::Env::GetInstance()->is_mouse_button_down(); | 1005 return aura::Env::GetInstance()->is_mouse_button_down(); |
1008 } | 1006 } |
1009 | 1007 |
1010 // static | 1008 // static |
1011 bool NativeWidgetPrivate::IsTouchDown() { | 1009 bool NativeWidgetPrivate::IsTouchDown() { |
1012 return aura::Env::GetInstance()->is_touch_down(); | 1010 return aura::Env::GetInstance()->is_touch_down(); |
1013 } | 1011 } |
1014 | 1012 |
1015 } // namespace internal | 1013 } // namespace internal |
1016 } // namespace views | 1014 } // namespace views |
OLD | NEW |