| 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 tooltip_manager_.reset(); | 651 tooltip_manager_.reset(); |
| 652 delegate_->OnNativeWidgetDestroyed(); | 652 delegate_->OnNativeWidgetDestroyed(); |
| 653 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) | 653 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) |
| 654 delete this; | 654 delete this; |
| 655 } | 655 } |
| 656 | 656 |
| 657 void NativeWidgetAura::OnWindowVisibilityChanged(bool visible) { | 657 void NativeWidgetAura::OnWindowVisibilityChanged(bool visible) { |
| 658 delegate_->OnNativeWidgetVisibilityChanged(visible); | 658 delegate_->OnNativeWidgetVisibilityChanged(visible); |
| 659 } | 659 } |
| 660 | 660 |
| 661 bool NativeWidgetAura::CanDrop(const aura::DropTargetEvent& event) { | |
| 662 DCHECK(drop_helper_.get() != NULL); | |
| 663 View* view = drop_helper_->target_view(); | |
| 664 if (view) | |
| 665 return view->CanDrop(event.data()); | |
| 666 return false; | |
| 667 } | |
| 668 | |
| 669 void NativeWidgetAura::OnDragEntered(const aura::DropTargetEvent& event) { | 661 void NativeWidgetAura::OnDragEntered(const aura::DropTargetEvent& event) { |
| 670 DCHECK(drop_helper_.get() != NULL); | 662 DCHECK(drop_helper_.get() != NULL); |
| 671 drop_helper_->OnDragOver(event.data(), event.location(), | 663 drop_helper_->OnDragOver(event.data(), event.location(), |
| 672 event.source_operations()); | 664 event.source_operations()); |
| 673 } | 665 } |
| 674 | 666 |
| 675 int NativeWidgetAura::OnDragUpdated(const aura::DropTargetEvent& event) { | 667 int NativeWidgetAura::OnDragUpdated(const aura::DropTargetEvent& event) { |
| 676 DCHECK(drop_helper_.get() != NULL); | 668 DCHECK(drop_helper_.get() != NULL); |
| 677 return drop_helper_->OnDragOver(event.data(), event.location(), | 669 return drop_helper_->OnDragOver(event.data(), event.location(), |
| 678 event.source_operations()); | 670 event.source_operations()); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 NOTIMPLEMENTED(); | 767 NOTIMPLEMENTED(); |
| 776 } | 768 } |
| 777 | 769 |
| 778 // static | 770 // static |
| 779 bool NativeWidgetPrivate::IsMouseButtonDown() { | 771 bool NativeWidgetPrivate::IsMouseButtonDown() { |
| 780 return aura::Desktop::GetInstance()->IsMouseButtonDown(); | 772 return aura::Desktop::GetInstance()->IsMouseButtonDown(); |
| 781 } | 773 } |
| 782 | 774 |
| 783 } // namespace internal | 775 } // namespace internal |
| 784 } // namespace views | 776 } // namespace views |
| OLD | NEW |