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

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

Issue 265713007: views: Update event-related API to use PointF/RectF instead of Point/Rect. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 int num_drag_enters_; 65 int num_drag_enters_;
66 int num_drag_exits_; 66 int num_drag_exits_;
67 int num_drag_updates_; 67 int num_drag_updates_;
68 int num_drops_; 68 int num_drops_;
69 bool drag_done_received_; 69 bool drag_done_received_;
70 bool long_tap_received_; 70 bool long_tap_received_;
71 71
72 private: 72 private:
73 // View overrides: 73 // View overrides:
74 virtual int GetDragOperations(const gfx::Point& press_pt) OVERRIDE { 74 virtual int GetDragOperations(const gfx::PointF& 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::PointF& 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(
85 image_skia, image_skia.size(), gfx::Vector2d(), data); 85 image_skia, image_skia.size(), gfx::Vector2d(), data);
86 } 86 }
87 87
88 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { 88 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE {
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); 1078 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString());
1079 } 1079 }
1080 for (aura::Window::Windows::iterator iter = root_windows.begin(); 1080 for (aura::Window::Windows::iterator iter = root_windows.begin();
1081 iter != root_windows.end(); ++iter) { 1081 iter != root_windows.end(); ++iter) {
1082 aura::client::SetDragDropClient(*iter, NULL); 1082 aura::client::SetDragDropClient(*iter, NULL);
1083 } 1083 }
1084 } 1084 }
1085 1085
1086 } // namespace test 1086 } // namespace test
1087 } // namespace aura 1087 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698