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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_win.cc

Issue 11444013: Get drag and drop working for win aura. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix bookmarks interactive tests since now that DRWHW::GetLocationOnNativeScreen is fixed ui_control… Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
===================================================================
--- ui/views/widget/desktop_aura/desktop_root_window_host_win.cc (revision 171535)
+++ ui/views/widget/desktop_aura/desktop_root_window_host_win.cc (working copy)
@@ -25,8 +25,10 @@
#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/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 +131,14 @@
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(root_window_,
+ GetHWND()));
+ 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.
@@ -399,7 +404,9 @@
}
gfx::Point DesktopRootWindowHostWin::GetLocationOnNativeScreen() const {
- return gfx::Point(1, 1);
+ RECT r;
+ GetWindowRect(GetHWND(), &r);
+ return gfx::Point(r.left, r.top);
}
void DesktopRootWindowHostWin::SetCapture() {
@@ -614,11 +621,11 @@
// 1. Window property association
// 2. MouseWheel.
- // 3. Drop target.
- // 4. Tooltip Manager.
+ // 3. Tooltip Manager.
}
void DesktopRootWindowHostWin::HandleDestroying() {
+ drag_drop_client_->OnNativeWidgetDestroying(GetHWND());
native_widget_delegate_->OnNativeWidgetDestroying();
}

Powered by Google App Engine
This is Rietveld 408576698