Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 8682029: Make drag and drop work on webpage. Also slightly modify drag drop workflow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modified according to comments Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698