| 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> | 7 #include <X11/Xatom.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // The time to wait since sending the last XdndPosition message before | 121 // The time to wait since sending the last XdndPosition message before |
| 122 // reprocessing the most recent mouse move event in case that the window | 122 // reprocessing the most recent mouse move event in case that the window |
| 123 // stacking order has changed and |source_current_window_| needs to be updated. | 123 // stacking order has changed and |source_current_window_| needs to be updated. |
| 124 const int kRepeatMouseMoveTimeoutMs = 350; | 124 const int kRepeatMouseMoveTimeoutMs = 350; |
| 125 | 125 |
| 126 // The minimum alpha before we declare a pixel transparent when searching in | 126 // The minimum alpha before we declare a pixel transparent when searching in |
| 127 // our source image. | 127 // our source image. |
| 128 const uint32_t kMinAlpha = 32; | 128 const uint32_t kMinAlpha = 32; |
| 129 | 129 |
| 130 // |drag_widget_|'s opacity. | 130 // |drag_widget_|'s opacity. |
| 131 const unsigned char kDragWidgetOpacity = 0xc0; | 131 const float kDragWidgetOpacity = .75f; |
| 132 | 132 |
| 133 static base::LazyInstance< | 133 static base::LazyInstance< |
| 134 std::map< ::Window, views::DesktopDragDropClientAuraX11*> >::Leaky | 134 std::map< ::Window, views::DesktopDragDropClientAuraX11*> >::Leaky |
| 135 g_live_client_map = LAZY_INSTANCE_INITIALIZER; | 135 g_live_client_map = LAZY_INSTANCE_INITIALIZER; |
| 136 | 136 |
| 137 } // namespace | 137 } // namespace |
| 138 | 138 |
| 139 namespace views { | 139 namespace views { |
| 140 | 140 |
| 141 DesktopDragDropClientAuraX11* | 141 DesktopDragDropClientAuraX11* |
| (...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 for (int x = 0; x < in_bitmap->width(); ++x) { | 1227 for (int x = 0; x < in_bitmap->width(); ++x) { |
| 1228 if (SkColorGetA(in_row[x]) > kMinAlpha) | 1228 if (SkColorGetA(in_row[x]) > kMinAlpha) |
| 1229 return true; | 1229 return true; |
| 1230 } | 1230 } |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 return false; | 1233 return false; |
| 1234 } | 1234 } |
| 1235 | 1235 |
| 1236 } // namespace views | 1236 } // namespace views |
| OLD | NEW |