| 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 <X11/Xatom.h> | |
| 8 #include <stddef.h> | 7 #include <stddef.h> |
| 9 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <X11/Xatom.h> |
| 10 | 10 |
| 11 #include "base/event_types.h" | 11 #include "base/event_types.h" |
| 12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/metrics/histogram_macros.h" | 16 #include "base/metrics/histogram_macros.h" |
| 17 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
| 18 #include "ui/aura/client/capture_client.h" | 18 #include "ui/aura/client/capture_client.h" |
| 19 #include "ui/aura/client/drag_drop_client.h" |
| 19 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
| 20 #include "ui/aura/window_tree_host.h" | 21 #include "ui/aura/window_tree_host.h" |
| 21 #include "ui/base/clipboard/clipboard.h" | 22 #include "ui/base/clipboard/clipboard.h" |
| 22 #include "ui/base/dragdrop/drop_target_event.h" | 23 #include "ui/base/dragdrop/drop_target_event.h" |
| 23 #include "ui/base/dragdrop/os_exchange_data.h" | 24 #include "ui/base/dragdrop/os_exchange_data.h" |
| 24 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" | 25 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" |
| 25 #include "ui/base/x/selection_utils.h" | 26 #include "ui/base/x/selection_utils.h" |
| 26 #include "ui/base/x/x11_util.h" | 27 #include "ui/base/x/x11_util.h" |
| 27 #include "ui/base/x/x11_window_event_manager.h" | 28 #include "ui/base/x/x11_window_event_manager.h" |
| 28 #include "ui/display/screen.h" | 29 #include "ui/display/screen.h" |
| 29 #include "ui/events/event.h" | 30 #include "ui/events/event.h" |
| 30 #include "ui/events/event_utils.h" | 31 #include "ui/events/event_utils.h" |
| 31 #include "ui/events/platform/platform_event_source.h" | 32 #include "ui/events/platform/platform_event_source.h" |
| 32 #include "ui/gfx/image/image_skia.h" | 33 #include "ui/gfx/image/image_skia.h" |
| 33 #include "ui/views/controls/image_view.h" | 34 #include "ui/views/controls/image_view.h" |
| 34 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" | 35 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" |
| 35 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" | 36 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" |
| 36 #include "ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h" | 37 #include "ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h" |
| 37 #include "ui/views/widget/widget.h" | 38 #include "ui/views/widget/widget.h" |
| 38 #include "ui/wm/public/drag_drop_client.h" | |
| 39 #include "ui/wm/public/drag_drop_delegate.h" | 39 #include "ui/wm/public/drag_drop_delegate.h" |
| 40 | 40 |
| 41 // Reading recommended for understanding the implementation in this file: | 41 // Reading recommended for understanding the implementation in this file: |
| 42 // | 42 // |
| 43 // * The X Window System Concepts section in The X New Developer’s Guide | 43 // * The X Window System Concepts section in The X New Developer’s Guide |
| 44 // * The X Selection Mechanism paper by Keith Packard | 44 // * The X Selection Mechanism paper by Keith Packard |
| 45 // * The Peer-to-Peer Communication by Means of Selections section in the | 45 // * The Peer-to-Peer Communication by Means of Selections section in the |
| 46 // ICCCM (X Consortium's Inter-Client Communication Conventions Manual) | 46 // ICCCM (X Consortium's Inter-Client Communication Conventions Manual) |
| 47 // * The XDND specification, Drag-and-Drop Protocol for the X Window System | 47 // * The XDND specification, Drag-and-Drop Protocol for the X Window System |
| 48 // * The XDS specification, The Direct Save Protocol for the X Window System | 48 // * The XDS specification, The Direct Save Protocol for the X Window System |
| (...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1366 for (int x = 0; x < in_bitmap->width(); ++x) { | 1366 for (int x = 0; x < in_bitmap->width(); ++x) { |
| 1367 if (SkColorGetA(in_row[x]) > kMinAlpha) | 1367 if (SkColorGetA(in_row[x]) > kMinAlpha) |
| 1368 return true; | 1368 return true; |
| 1369 } | 1369 } |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 return false; | 1372 return false; |
| 1373 } | 1373 } |
| 1374 | 1374 |
| 1375 } // namespace views | 1375 } // namespace views |
| OLD | NEW |