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 "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/location.h" | 9 #include "base/location.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 private: | 60 private: |
61 // View overrides: | 61 // View overrides: |
62 int GetDragOperations(const gfx::Point& press_pt) OVERRIDE { | 62 int GetDragOperations(const gfx::Point& press_pt) OVERRIDE { |
63 return ui::DragDropTypes::DRAG_COPY; | 63 return ui::DragDropTypes::DRAG_COPY; |
64 } | 64 } |
65 | 65 |
66 void WriteDragData(const gfx::Point& p, OSExchangeData* data) OVERRIDE { | 66 void WriteDragData(const gfx::Point& p, OSExchangeData* data) OVERRIDE { |
67 data->SetString(UTF8ToUTF16("I am being dragged")); | 67 data->SetString(UTF8ToUTF16("I am being dragged")); |
68 } | 68 } |
69 | 69 |
70 bool OnMousePressed(const views::MouseEvent& event) OVERRIDE { | 70 bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { |
71 return true; | 71 return true; |
72 } | 72 } |
73 | 73 |
74 bool GetDropFormats(int* formats, | 74 bool GetDropFormats(int* formats, |
75 std::set<OSExchangeData::CustomFormat>* custom_formats) { | 75 std::set<OSExchangeData::CustomFormat>* custom_formats) { |
76 *formats = ui::OSExchangeData::STRING; | 76 *formats = ui::OSExchangeData::STRING; |
77 return true; | 77 return true; |
78 } | 78 } |
79 | 79 |
80 bool CanDrop(const OSExchangeData& data) OVERRIDE { | 80 bool CanDrop(const OSExchangeData& data) OVERRIDE { |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 EXPECT_EQ(1, drag_view->num_drag_enters_); | 666 EXPECT_EQ(1, drag_view->num_drag_enters_); |
667 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(), | 667 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(), |
668 drag_view->num_drag_updates_); | 668 drag_view->num_drag_updates_); |
669 EXPECT_EQ(0, drag_view->num_drops_); | 669 EXPECT_EQ(0, drag_view->num_drops_); |
670 EXPECT_EQ(1, drag_view->num_drag_exits_); | 670 EXPECT_EQ(1, drag_view->num_drag_exits_); |
671 EXPECT_TRUE(drag_view->drag_done_received_); | 671 EXPECT_TRUE(drag_view->drag_done_received_); |
672 } | 672 } |
673 | 673 |
674 } // namespace test | 674 } // namespace test |
675 } // namespace aura | 675 } // namespace aura |
OLD | NEW |