| Index: ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
|
| ===================================================================
|
| --- ui/views/widget/desktop_aura/desktop_root_window_host_win.cc (revision 170738)
|
| +++ ui/views/widget/desktop_aura/desktop_root_window_host_win.cc (working copy)
|
| @@ -25,8 +25,11 @@
|
| #include "ui/views/widget/desktop_aura/desktop_activation_client.h"
|
| #include "ui/views/widget/desktop_aura/desktop_cursor_client.h"
|
| #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h"
|
| +#include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h"
|
| #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
| #include "ui/views/widget/desktop_aura/desktop_screen_position_client.h"
|
| +#include "ui/views/widget/drop_target_win.h"
|
| +#include "ui/views/widget/root_view.h"
|
| #include "ui/views/widget/widget_delegate.h"
|
| #include "ui/views/widget/widget_hwnd_utils.h"
|
| #include "ui/views/win/fullscreen_handler.h"
|
| @@ -129,11 +132,13 @@
|
| cursor_client_.reset(new DesktopCursorClient(root_window_));
|
| aura::client::SetCursorClient(root_window_, cursor_client_.get());
|
|
|
| -
|
| position_client_.reset(new DesktopScreenPositionClient());
|
| aura::client::SetScreenPositionClient(root_window_,
|
| position_client_.get());
|
|
|
| + drag_drop_client_.reset(new DesktopDragDropClientWin);
|
| + aura::client::SetDragDropClient(root_window_, drag_drop_client_.get());
|
| +
|
| // CEF sets focus to the window the user clicks down on.
|
| // TODO(beng): see if we can't do this some other way. CEF seems a heavy-
|
| // handed way of accomplishing focus.
|
| @@ -610,15 +615,22 @@
|
| // TODO(beng): moar
|
| NOTIMPLEMENTED();
|
|
|
| + drop_target_ = new DropTargetWin(
|
| + static_cast<internal::RootView*>(GetWidget()->GetRootView()),
|
| + GetHWND());
|
| +
|
| native_widget_delegate_->OnNativeWidgetCreated();
|
|
|
| // 1. Window property association
|
| // 2. MouseWheel.
|
| - // 3. Drop target.
|
| - // 4. Tooltip Manager.
|
| + // 3. Tooltip Manager.
|
| }
|
|
|
| void DesktopRootWindowHostWin::HandleDestroying() {
|
| + if (drop_target_.get()) {
|
| + RevokeDragDrop(GetHWND());
|
| + drop_target_ = NULL;
|
| + }
|
| native_widget_delegate_->OnNativeWidgetDestroying();
|
| }
|
|
|
|
|