| 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/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "ui/aura/client/activation_client.h" | 8 #include "ui/aura/client/activation_client.h" |
| 9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
| 10 #include "ui/aura/client/stacking_client.h" | 10 #include "ui/aura/client/stacking_client.h" |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 } | 771 } |
| 772 if (store_focused_view) { | 772 if (store_focused_view) { |
| 773 DCHECK(!restore_focus_on_activate_); | 773 DCHECK(!restore_focus_on_activate_); |
| 774 restore_focus_on_activate_ = true; | 774 restore_focus_on_activate_ = true; |
| 775 // Pass in false so that ClearNativeFocus() isn't invoked. | 775 // Pass in false so that ClearNativeFocus() isn't invoked. |
| 776 GetWidget()->GetFocusManager()->StoreFocusedView(false); | 776 GetWidget()->GetFocusManager()->StoreFocusedView(false); |
| 777 } | 777 } |
| 778 } | 778 } |
| 779 } | 779 } |
| 780 | 780 |
| 781 void DesktopNativeWidgetAura::OnWindowActivationRequestCompleted( |
| 782 aura::Window* request_active, aura::Window* actual_active) { |
| 783 } |
| 784 |
| 781 //////////////////////////////////////////////////////////////////////////////// | 785 //////////////////////////////////////////////////////////////////////////////// |
| 782 // DesktopNativeWidgetAura, aura::client::FocusChangeObserver implementation: | 786 // DesktopNativeWidgetAura, aura::client::FocusChangeObserver implementation: |
| 783 | 787 |
| 784 void DesktopNativeWidgetAura::OnWindowFocused(aura::Window* gained_focus, | 788 void DesktopNativeWidgetAura::OnWindowFocused(aura::Window* gained_focus, |
| 785 aura::Window* lost_focus) { | 789 aura::Window* lost_focus) { |
| 786 if (window_ == gained_focus) { | 790 if (window_ == gained_focus) { |
| 787 desktop_root_window_host_->OnNativeWidgetFocus(); | 791 desktop_root_window_host_->OnNativeWidgetFocus(); |
| 788 native_widget_delegate_->OnNativeFocus(lost_focus); | 792 native_widget_delegate_->OnNativeFocus(lost_focus); |
| 789 | 793 |
| 790 // If focus is moving from a descendant Window to |window_| then native | 794 // If focus is moving from a descendant Window to |window_| then native |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 drop_helper_->OnDragExit(); | 837 drop_helper_->OnDragExit(); |
| 834 } | 838 } |
| 835 | 839 |
| 836 int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) { | 840 int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) { |
| 837 DCHECK(drop_helper_.get() != NULL); | 841 DCHECK(drop_helper_.get() != NULL); |
| 838 return drop_helper_->OnDrop(event.data(), event.location(), | 842 return drop_helper_->OnDrop(event.data(), event.location(), |
| 839 last_drop_operation_); | 843 last_drop_operation_); |
| 840 } | 844 } |
| 841 | 845 |
| 842 } // namespace views | 846 } // namespace views |
| OLD | NEW |