OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_drag_drop_client_aurax11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 | 10 |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 void DesktopDragDropClientAuraX11::EndMoveLoop() { | 1085 void DesktopDragDropClientAuraX11::EndMoveLoop() { |
1086 move_loop_->EndMoveLoop(); | 1086 move_loop_->EndMoveLoop(); |
1087 } | 1087 } |
1088 | 1088 |
1089 void DesktopDragDropClientAuraX11::DragTranslate( | 1089 void DesktopDragDropClientAuraX11::DragTranslate( |
1090 const gfx::Point& root_window_location, | 1090 const gfx::Point& root_window_location, |
1091 std::unique_ptr<ui::OSExchangeData>* data, | 1091 std::unique_ptr<ui::OSExchangeData>* data, |
1092 std::unique_ptr<ui::DropTargetEvent>* event, | 1092 std::unique_ptr<ui::DropTargetEvent>* event, |
1093 aura::client::DragDropDelegate** delegate) { | 1093 aura::client::DragDropDelegate** delegate) { |
1094 gfx::Point root_location = root_window_location; | 1094 gfx::Point root_location = root_window_location; |
1095 root_window_->GetHost()->ConvertPointFromNativeScreen(&root_location); | 1095 root_window_->GetHost()->ConvertScreenInPixelsToDIP(&root_location); |
1096 aura::Window* target_window = | 1096 aura::Window* target_window = |
1097 root_window_->GetEventHandlerForPoint(root_location); | 1097 root_window_->GetEventHandlerForPoint(root_location); |
1098 bool target_window_changed = false; | 1098 bool target_window_changed = false; |
1099 if (target_window != target_window_) { | 1099 if (target_window != target_window_) { |
1100 if (target_window_) | 1100 if (target_window_) |
1101 NotifyDragLeave(); | 1101 NotifyDragLeave(); |
1102 target_window_ = target_window; | 1102 target_window_ = target_window; |
1103 if (target_window_) | 1103 if (target_window_) |
1104 target_window_->AddObserver(this); | 1104 target_window_->AddObserver(this); |
1105 target_window_changed = true; | 1105 target_window_changed = true; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 for (int x = 0; x < in_bitmap->width(); ++x) { | 1359 for (int x = 0; x < in_bitmap->width(); ++x) { |
1360 if (SkColorGetA(in_row[x]) > kMinAlpha) | 1360 if (SkColorGetA(in_row[x]) > kMinAlpha) |
1361 return true; | 1361 return true; |
1362 } | 1362 } |
1363 } | 1363 } |
1364 | 1364 |
1365 return false; | 1365 return false; |
1366 } | 1366 } |
1367 | 1367 |
1368 } // namespace views | 1368 } // namespace views |
OLD | NEW |