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

Unified Diff: ui/views/widget/native_widget_mac.mm

Issue 1964283002: MacViews: Implemented Drag & Drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for dcheng Created 4 years, 6 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
« ui/views/cocoa/drag_drop_client_mac.mm ('K') | « ui/views/views.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac.mm
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index 9f3bea34f4d264a33c89d1624f6d691ec3822f54..96580ce57ff6330ac0b88f486e9f0f089929394c 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -20,8 +20,10 @@
#include "ui/native_theme/native_theme_mac.h"
#import "ui/views/cocoa/bridged_content_view.h"
#import "ui/views/cocoa/bridged_native_widget.h"
+#import "ui/views/cocoa/drag_drop_client_mac.h"
#import "ui/views/cocoa/native_widget_mac_nswindow.h"
#import "ui/views/cocoa/views_nswindow_delegate.h"
+#include "ui/views/widget/drop_helper.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/window/native_frame_view.h"
@@ -201,11 +203,9 @@ void NativeWidgetMac::ReorderNativeViews() {
}
void NativeWidgetMac::ViewRemoved(View* view) {
- // TODO(tapted): Something for drag and drop might be needed here in future.
- // See http://crbug.com/464581. A NOTIMPLEMENTED() here makes a lot of spam,
- // so only emit it when a drag and drop could be likely.
- if (IsMouseButtonDown())
- NOTIMPLEMENTED();
+ DragDropClientMac* client = bridge_ ? bridge_->drag_drop_client() : nullptr;
+ if (client)
+ client->drop_helper()->ResetTargetViewIfEquals(view);
}
void NativeWidgetMac::SetNativeWindowProperty(const char* name, void* value) {
@@ -507,7 +507,7 @@ void NativeWidgetMac::RunShellDrag(View* view,
const gfx::Point& location,
int operation,
ui::DragDropTypes::DragEventSource source) {
- NOTIMPLEMENTED();
+ bridge_->drag_drop_client()->StartDragAndDrop(view, data, operation, source);
}
void NativeWidgetMac::SchedulePaintInRect(const gfx::Rect& rect) {
« ui/views/cocoa/drag_drop_client_mac.mm ('K') | « ui/views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698