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

Side by Side Diff: services/ui/ws/drag_controller_unittest.cc

Issue 2764963003: aura-mus: add a drag representation image. (Closed)
Patch Set: Patch cleanup. Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/ws/drag_controller.h" 5 #include "services/ui/ws/drag_controller.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <utility> 10 #include <utility>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 testing::Test::TearDown(); 229 testing::Test::TearDown();
230 } 230 }
231 231
232 // Overridden from DragCursorUpdater: 232 // Overridden from DragCursorUpdater:
233 void OnDragCursorUpdated() override { 233 void OnDragCursorUpdated() override {
234 if (drag_operation_) 234 if (drag_operation_)
235 cursor_ = ui::mojom::Cursor(drag_operation_->current_cursor()); 235 cursor_ = ui::mojom::Cursor(drag_operation_->current_cursor());
236 } 236 }
237 237
238 // Overridden from DragControllerSource: 238 // Overridden from DragControllerSource:
239 void OnDragContinued(const gfx::Point& location) override {}
240
239 void OnDragCompleted(bool success, uint32_t action_taken) override { 241 void OnDragCompleted(bool success, uint32_t action_taken) override {
240 drag_completed_action_ = action_taken; 242 drag_completed_action_ = action_taken;
241 drag_completed_value_ = success; 243 drag_completed_value_ = success;
242 } 244 }
243 245
244 ServerWindow* GetWindowById(const WindowId& id) override { 246 ServerWindow* GetWindowById(const WindowId& id) override {
245 auto it = server_window_by_id_.find(id); 247 auto it = server_window_by_id_.find(id);
246 if (it == server_window_by_id_.end()) 248 if (it == server_window_by_id_.end())
247 return nullptr; 249 return nullptr;
248 return it->second; 250 return it->second;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 680
679 // Window 2 responding negatively to its queued messages shouldn't change the 681 // Window 2 responding negatively to its queued messages shouldn't change the
680 // cursor. 682 // cursor.
681 window2->Respond(false); 683 window2->Respond(false);
682 684
683 EXPECT_EQ(ui::mojom::Cursor::COPY, cursor()); 685 EXPECT_EQ(ui::mojom::Cursor::COPY, cursor());
684 } 686 }
685 687
686 } // namespace ws 688 } // namespace ws
687 } // namespace ui 689 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698