Index: ui/views/cocoa/bridged_native_widget.mm |
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm |
index da6acf2f6a6058fe3d52ded46b29a8c893c4e8c6..55c7224c660dc387ff4ddf91814811106a28e831 100644 |
--- a/ui/views/cocoa/bridged_native_widget.mm |
+++ b/ui/views/cocoa/bridged_native_widget.mm |
@@ -24,6 +24,7 @@ |
#import "ui/gfx/mac/coordinate_conversion.h" |
#import "ui/gfx/mac/nswindow_frame_controls.h" |
#import "ui/views/cocoa/bridged_content_view.h" |
+#import "ui/views/cocoa/drag_drop_client_mac.h" |
#import "ui/views/cocoa/cocoa_mouse_capture.h" |
#include "ui/views/cocoa/tooltip_manager_mac.h" |
#import "ui/views/cocoa/views_nswindow_delegate.h" |
@@ -336,6 +337,7 @@ BridgedNativeWidget::BridgedNativeWidget(NativeWidgetMac* parent) |
DCHECK(parent); |
window_delegate_.reset( |
[[ViewsNSWindowDelegate alloc] initWithBridgedNativeWidget:this]); |
+ drag_drop_client_.reset(new DragDropClientMac(this)); |
tapted
2016/05/24 08:06:01
can this be done at the end of BridgedNativeWidget
spqchan
2016/05/26 01:56:53
Done.
|
} |
BridgedNativeWidget::~BridgedNativeWidget() { |
@@ -527,6 +529,8 @@ void BridgedNativeWidget::SetRootView(views::View* view) { |
if (view) { |
bridged_view_.reset([[BridgedContentView alloc] initWithView:view]); |
+ drag_drop_client_->SetRootView(view); |
tapted
2016/05/24 08:06:01
hopefully we don't need this if we can avoid some
|
+ |
// Objective C initializers can return nil. However, if |view| is non-NULL |
// this should be treated as an error and caught early. |
CHECK(bridged_view_); |