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/drag_drop/drag_drop_tracker.h" | 7 #include "ash/drag_drop/drag_drop_tracker.h" |
8 #include "ash/drag_drop/drag_image_view.h" | 8 #include "ash/drag_drop/drag_image_view.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 virtual int GetDragOperations(const gfx::Point& press_pt) OVERRIDE { | 74 virtual int GetDragOperations(const gfx::Point& press_pt) OVERRIDE { |
75 return ui::DragDropTypes::DRAG_COPY; | 75 return ui::DragDropTypes::DRAG_COPY; |
76 } | 76 } |
77 | 77 |
78 virtual void WriteDragData(const gfx::Point& p, | 78 virtual void WriteDragData(const gfx::Point& p, |
79 OSExchangeData* data) OVERRIDE { | 79 OSExchangeData* data) OVERRIDE { |
80 data->SetString(base::UTF8ToUTF16("I am being dragged")); | 80 data->SetString(base::UTF8ToUTF16("I am being dragged")); |
81 gfx::ImageSkiaRep image_rep(gfx::Size(10, 20), 1.0f); | 81 gfx::ImageSkiaRep image_rep(gfx::Size(10, 20), 1.0f); |
82 gfx::ImageSkia image_skia(image_rep); | 82 gfx::ImageSkia image_skia(image_rep); |
83 | 83 |
84 drag_utils::SetDragImageOnDataObject( | 84 drag_utils::SetDragImageOnDataObject(image_skia, gfx::Vector2d(), data); |
85 image_skia, image_skia.size(), gfx::Vector2d(), data); | |
86 } | 85 } |
87 | 86 |
88 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { | 87 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { |
89 return true; | 88 return true; |
90 } | 89 } |
91 | 90 |
92 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { | 91 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { |
93 if (event->type() == ui::ET_GESTURE_LONG_TAP) | 92 if (event->type() == ui::ET_GESTURE_LONG_TAP) |
94 long_tap_received_ = true; | 93 long_tap_received_ = true; |
95 return; | 94 return; |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); | 1079 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); |
1081 } | 1080 } |
1082 for (aura::Window::Windows::iterator iter = root_windows.begin(); | 1081 for (aura::Window::Windows::iterator iter = root_windows.begin(); |
1083 iter != root_windows.end(); ++iter) { | 1082 iter != root_windows.end(); ++iter) { |
1084 aura::client::SetDragDropClient(*iter, NULL); | 1083 aura::client::SetDragDropClient(*iter, NULL); |
1085 } | 1084 } |
1086 } | 1085 } |
1087 | 1086 |
1088 } // namespace test | 1087 } // namespace test |
1089 } // namespace aura | 1088 } // namespace aura |
OLD | NEW |