Chromium Code Reviews| 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 674 move_loop_->EndMoveLoop(); | 674 move_loop_->EndMoveLoop(); |
| 675 return; | 675 return; |
| 676 } | 676 } |
| 677 source_state_ = SOURCE_STATE_DROPPED; | 677 source_state_ = SOURCE_STATE_DROPPED; |
| 678 SendXdndDrop(source_window); | 678 SendXdndDrop(source_window); |
| 679 return; | 679 return; |
| 680 } | 680 } |
| 681 | 681 |
| 682 int cursor_type = ui::kCursorNull; | 682 int cursor_type = ui::kCursorNull; |
| 683 switch (negotiated_operation_) { | 683 switch (negotiated_operation_) { |
| 684 case ui::DragDropTypes::DRAG_COPY: | 684 case ui::DragDropTypes::DRAG_NONE: |
| 685 cursor_type = ui::kCursorCopy; | 685 cursor_type = ui::kCursorDndNone; |
| 686 break; | 686 break; |
| 687 case ui::DragDropTypes::DRAG_MOVE: | 687 case ui::DragDropTypes::DRAG_MOVE: |
| 688 cursor_type = ui::kCursorMove; | 688 cursor_type = ui::kCursorDndMove; |
| 689 break; | |
| 690 case ui::DragDropTypes::DRAG_COPY: | |
| 691 cursor_type = ui::kCursorDndCopy; | |
| 692 break; | |
| 693 case ui::DragDropTypes::DRAG_LINK: | |
| 694 cursor_type = ui::kCursorDndLink; | |
| 689 break; | 695 break; |
| 690 default: | 696 default: |
|
sadrul
2016/11/17 16:17:03
Remove the default:
Tom (Use chromium acct)
2016/11/17 19:17:48
Done.
| |
| 691 cursor_type = ui::kCursorGrabbing; | 697 NOTREACHED(); |
| 692 break; | |
| 693 } | 698 } |
| 694 move_loop_->UpdateCursor(cursor_manager_->GetInitializedCursor(cursor_type)); | 699 move_loop_->UpdateCursor(cursor_manager_->GetInitializedCursor(cursor_type)); |
| 695 | 700 |
| 696 // Note: event.data.[2,3] specify a rectangle. It is a request by the other | 701 // Note: event.data.[2,3] specify a rectangle. It is a request by the other |
| 697 // window to not send further XdndPosition messages while the cursor is | 702 // window to not send further XdndPosition messages while the cursor is |
| 698 // within it. However, it is considered advisory and (at least according to | 703 // within it. However, it is considered advisory and (at least according to |
| 699 // the spec) the other side must handle further position messages within | 704 // the spec) the other side must handle further position messages within |
| 700 // it. GTK+ doesn't bother with this, so neither should we. | 705 // it. GTK+ doesn't bother with this, so neither should we. |
| 701 | 706 |
| 702 if (next_position_message_.get()) { | 707 if (next_position_message_.get()) { |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1356 for (int x = 0; x < in_bitmap->width(); ++x) { | 1361 for (int x = 0; x < in_bitmap->width(); ++x) { |
| 1357 if (SkColorGetA(in_row[x]) > kMinAlpha) | 1362 if (SkColorGetA(in_row[x]) > kMinAlpha) |
| 1358 return true; | 1363 return true; |
| 1359 } | 1364 } |
| 1360 } | 1365 } |
| 1361 | 1366 |
| 1362 return false; | 1367 return false; |
| 1363 } | 1368 } |
| 1364 | 1369 |
| 1365 } // namespace views | 1370 } // namespace views |
| OLD | NEW |