| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/drag_drop/drag_drop_controller.h" | 5 #include "ash/drag_drop/drag_drop_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace ash { | 22 namespace ash { |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 class DraggableView : public views::View { | 25 class DraggableView : public views::View { |
| 26 public: | 26 public: |
| 27 DraggableView() {} | 27 DraggableView() {} |
| 28 virtual ~DraggableView() {} | 28 virtual ~DraggableView() {} |
| 29 | 29 |
| 30 // views::View overrides: | 30 // views::View overrides: |
| 31 virtual int GetDragOperations(const gfx::Point& press_pt) OVERRIDE { | 31 virtual int GetDragOperations(const gfx::PointF& press_pt) OVERRIDE { |
| 32 return ui::DragDropTypes::DRAG_MOVE; | 32 return ui::DragDropTypes::DRAG_MOVE; |
| 33 } | 33 } |
| 34 virtual void WriteDragData(const gfx::Point& press_pt, | 34 virtual void WriteDragData(const gfx::PointF& press_pt, |
| 35 OSExchangeData* data)OVERRIDE { | 35 OSExchangeData* data) OVERRIDE { |
| 36 data->SetString(base::UTF8ToUTF16("test")); | 36 data->SetString(base::UTF8ToUTF16("test")); |
| 37 } | 37 } |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 DISALLOW_COPY_AND_ASSIGN(DraggableView); | 40 DISALLOW_COPY_AND_ASSIGN(DraggableView); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 class TargetView : public views::View { | 43 class TargetView : public views::View { |
| 44 public: | 44 public: |
| 45 TargetView() : dropped_(false) {} | 45 TargetView() : dropped_(false) {} |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 base::MessageLoop::current()->Run(); | 178 base::MessageLoop::current()->Run(); |
| 179 | 179 |
| 180 EXPECT_TRUE(target_view->dropped()); | 180 EXPECT_TRUE(target_view->dropped()); |
| 181 | 181 |
| 182 source->Close(); | 182 source->Close(); |
| 183 target->Close(); | 183 target->Close(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace ash | 186 } // namespace ash |
| OLD | NEW |