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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 private: | 71 private: |
72 // View overrides: | 72 // View overrides: |
73 virtual int GetDragOperations(const gfx::Point& press_pt) OVERRIDE { | 73 virtual int GetDragOperations(const gfx::Point& press_pt) OVERRIDE { |
74 return ui::DragDropTypes::DRAG_COPY; | 74 return ui::DragDropTypes::DRAG_COPY; |
75 } | 75 } |
76 | 76 |
77 virtual void WriteDragData(const gfx::Point& p, | 77 virtual void WriteDragData(const gfx::Point& p, |
78 OSExchangeData* data) OVERRIDE { | 78 OSExchangeData* data) OVERRIDE { |
79 data->SetString(UTF8ToUTF16("I am being dragged")); | 79 data->SetString(UTF8ToUTF16("I am being dragged")); |
80 gfx::ImageSkiaRep image_rep(gfx::Size(10, 20), 1.0f); | 80 gfx::ImageSkiaRep image_rep(gfx::Size(10, 20), ui::SCALE_FACTOR_100P); |
81 gfx::ImageSkia image_skia(image_rep); | 81 gfx::ImageSkia image_skia(image_rep); |
82 | 82 |
83 drag_utils::SetDragImageOnDataObject( | 83 drag_utils::SetDragImageOnDataObject( |
84 image_skia, image_skia.size(), gfx::Vector2d(), data); | 84 image_skia, image_skia.size(), gfx::Vector2d(), data); |
85 } | 85 } |
86 | 86 |
87 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { | 87 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { |
88 return true; | 88 return true; |
89 } | 89 } |
90 | 90 |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); | 1099 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); |
1100 } | 1100 } |
1101 for (Shell::RootWindowList::iterator iter = root_windows.begin(); | 1101 for (Shell::RootWindowList::iterator iter = root_windows.begin(); |
1102 iter != root_windows.end(); ++iter) { | 1102 iter != root_windows.end(); ++iter) { |
1103 aura::client::SetDragDropClient(*iter, NULL); | 1103 aura::client::SetDragDropClient(*iter, NULL); |
1104 } | 1104 } |
1105 } | 1105 } |
1106 | 1106 |
1107 } // namespace test | 1107 } // namespace test |
1108 } // namespace aura | 1108 } // namespace aura |
OLD | NEW |