Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: trunk/src/ash/drag_drop/drag_drop_controller_unittest.cc

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « trunk/src/ash/display/mirror_window_controller.cc ('k') | trunk/src/ash/drag_drop/drag_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698