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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drop_target_win.cc

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/desktop_aura/desktop_drop_target_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_drop_target_win.h"
6 6
7 #include "base/win/win_util.h" 7 #include "base/win/win_util.h"
8 #include "ui/aura/client/drag_drop_client.h" 8 #include "ui/aura/client/drag_drop_client.h"
9 #include "ui/aura/client/drag_drop_delegate.h" 9 #include "ui/aura/client/drag_drop_delegate.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void DesktopDropTargetWin::Translate( 89 void DesktopDropTargetWin::Translate(
90 IDataObject* data_object, 90 IDataObject* data_object,
91 DWORD key_state, 91 DWORD key_state,
92 POINT position, 92 POINT position,
93 DWORD effect, 93 DWORD effect,
94 scoped_ptr<OSExchangeData>* data, 94 scoped_ptr<OSExchangeData>* data,
95 scoped_ptr<ui::DropTargetEvent>* event, 95 scoped_ptr<ui::DropTargetEvent>* event,
96 DragDropDelegate** delegate) { 96 DragDropDelegate** delegate) {
97 gfx::Point location(position.x, position.y); 97 gfx::Point location(position.x, position.y);
98 gfx::Point root_location = location; 98 gfx::Point root_location = location;
99 root_window_->GetDispatcher()->ConvertPointFromNativeScreen(&root_location); 99 root_window_->GetDispatcher()->host()->ConvertPointFromNativeScreen(
100 &root_location);
100 aura::Window* target_window = 101 aura::Window* target_window =
101 root_window_->GetEventHandlerForPoint(root_location); 102 root_window_->GetEventHandlerForPoint(root_location);
102 bool target_window_changed = false; 103 bool target_window_changed = false;
103 if (target_window != target_window_) { 104 if (target_window != target_window_) {
104 if (target_window_) 105 if (target_window_)
105 NotifyDragLeave(); 106 NotifyDragLeave();
106 target_window_ = target_window; 107 target_window_ = target_window;
107 if (target_window_) 108 if (target_window_)
108 target_window_->AddObserver(this); 109 target_window_->AddObserver(this);
109 target_window_changed = true; 110 target_window_changed = true;
(...skipping 27 matching lines...) Expand all
137 return; 138 return;
138 DragDropDelegate* delegate = 139 DragDropDelegate* delegate =
139 aura::client::GetDragDropDelegate(target_window_); 140 aura::client::GetDragDropDelegate(target_window_);
140 if (delegate) 141 if (delegate)
141 delegate->OnDragExited(); 142 delegate->OnDragExited();
142 target_window_->RemoveObserver(this); 143 target_window_->RemoveObserver(this);
143 target_window_ = NULL; 144 target_window_ = NULL;
144 } 145 }
145 146
146 } // namespace views 147 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698