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

Unified Diff: ui/views/widget/drop_helper.cc

Issue 2190773003: [ABANDONED] Simplify ash shelf dimmer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore an EventHandler object; fix behavior tests. Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/drop_helper.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/drop_helper.cc
diff --git a/ui/views/widget/drop_helper.cc b/ui/views/widget/drop_helper.cc
index 540301a61aae2fc7644c88d6166add19288d4bd6..667d953fcba6dec94a37f6e1ef3df3c07a5d1620 100644
--- a/ui/views/widget/drop_helper.cc
+++ b/ui/views/widget/drop_helper.cc
@@ -11,14 +11,9 @@
namespace views {
-DropHelper::DropHelper(View* root_view)
- : root_view_(root_view),
- target_view_(NULL),
- deepest_view_(NULL) {
-}
+DropHelper::DropHelper(View* root_view) : root_view_(root_view) {}
-DropHelper::~DropHelper() {
-}
+DropHelper::~DropHelper() {}
void DropHelper::ResetTargetViewIfEquals(View* view) {
if (target_view_ == view)
@@ -30,6 +25,11 @@ void DropHelper::ResetTargetViewIfEquals(View* view) {
int DropHelper::OnDragOver(const OSExchangeData& data,
const gfx::Point& root_view_location,
int drag_operation) {
+ LOG(ERROR) << "MSW DropHelper::OnDragOver";
+ if (!drag_over_widget_)
+ root_view_->GetWidget()->OnDragEnter();
+ drag_over_widget_ = true;
+
View* view = CalculateTargetViewImpl(root_view_location, data, true,
&deepest_view_);
@@ -44,6 +44,8 @@ int DropHelper::OnDragOver(const OSExchangeData& data,
}
void DropHelper::OnDragExit() {
+ root_view_->GetWidget()->OnDragExit();
+ drag_over_widget_ = false;
NotifyDragExit();
deepest_view_ = target_view_ = NULL;
}
@@ -51,6 +53,9 @@ void DropHelper::OnDragExit() {
int DropHelper::OnDrop(const OSExchangeData& data,
const gfx::Point& root_view_location,
int drag_operation) {
+ root_view_->GetWidget()->OnDragExit();
+ drag_over_widget_ = false;
+
View* drop_view = target_view_;
deepest_view_ = target_view_ = NULL;
if (!drop_view)
« no previous file with comments | « ui/views/widget/drop_helper.h ('k') | ui/views/widget/widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698