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_image_view.h" | 7 #include "ash/drag_drop/drag_image_view.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 gfx::ImageSkiaRep* image = new gfx::ImageSkiaRep( | 78 gfx::ImageSkiaRep* image = new gfx::ImageSkiaRep( |
79 gfx::Size(10, 20), ui::SCALE_FACTOR_100P); | 79 gfx::Size(10, 20), ui::SCALE_FACTOR_100P); |
80 gfx::ImageSkia* image_skia = new gfx::ImageSkia(*image); | 80 gfx::ImageSkia* image_skia = new gfx::ImageSkia(*image); |
81 provider.set_drag_image(*image_skia); | 81 provider.set_drag_image(*image_skia); |
82 } | 82 } |
83 | 83 |
84 bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { | 84 bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { |
85 return true; | 85 return true; |
86 } | 86 } |
87 | 87 |
88 ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE { | 88 void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { |
89 if (event->type() == ui::ET_GESTURE_LONG_TAP) | 89 if (event->type() == ui::ET_GESTURE_LONG_TAP) |
90 long_tap_received_ = true; | 90 long_tap_received_ = true; |
91 return ui::ER_UNHANDLED; | 91 return; |
92 } | 92 } |
93 | 93 |
94 bool GetDropFormats(int* formats, | 94 bool GetDropFormats(int* formats, |
95 std::set<OSExchangeData::CustomFormat>* custom_formats) { | 95 std::set<OSExchangeData::CustomFormat>* custom_formats) { |
96 *formats = ui::OSExchangeData::STRING; | 96 *formats = ui::OSExchangeData::STRING; |
97 return true; | 97 return true; |
98 } | 98 } |
99 | 99 |
100 bool CanDrop(const OSExchangeData& data) OVERRIDE { | 100 bool CanDrop(const OSExchangeData& data) OVERRIDE { |
101 return true; | 101 return true; |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); | 968 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); |
969 } | 969 } |
970 for (Shell::RootWindowList::iterator iter = root_windows.begin(); | 970 for (Shell::RootWindowList::iterator iter = root_windows.begin(); |
971 iter != root_windows.end(); ++iter) { | 971 iter != root_windows.end(); ++iter) { |
972 aura::client::SetDragDropClient(*iter, NULL); | 972 aura::client::SetDragDropClient(*iter, NULL); |
973 } | 973 } |
974 } | 974 } |
975 | 975 |
976 } // namespace test | 976 } // namespace test |
977 } // namespace aura | 977 } // namespace aura |
OLD | NEW |