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: services/ui/ws/event_dispatcher_unittest.cc

Issue 2376583003: mus: Keep track of the drag cursor during DnD operations. (Closed)
Patch Set: style Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/event_dispatcher.h" 5 #include "services/ui/ws/event_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 last_accelerator_phase_ = phase; 113 last_accelerator_phase_ = phase;
114 } 114 }
115 ServerWindow* GetFocusedWindowForEventDispatcher() override { 115 ServerWindow* GetFocusedWindowForEventDispatcher() override {
116 return focused_window_; 116 return focused_window_;
117 } 117 }
118 void SetNativeCapture(ServerWindow* window) override {} 118 void SetNativeCapture(ServerWindow* window) override {}
119 void ReleaseNativeCapture() override { 119 void ReleaseNativeCapture() override {
120 if (delegate_) 120 if (delegate_)
121 delegate_->ReleaseCapture(); 121 delegate_->ReleaseCapture();
122 } 122 }
123 void UpdateNativeCursorFromDispatcher() override {}
123 void OnCaptureChanged(ServerWindow* new_capture_window, 124 void OnCaptureChanged(ServerWindow* new_capture_window,
124 ServerWindow* old_capture_window) override { 125 ServerWindow* old_capture_window) override {
125 lost_capture_window_ = old_capture_window; 126 lost_capture_window_ = old_capture_window;
126 } 127 }
127 void OnMouseCursorLocationChanged(const gfx::Point& point) override {} 128 void OnMouseCursorLocationChanged(const gfx::Point& point) override {}
128 void DispatchInputEventToWindow(ServerWindow* target, 129 void DispatchInputEventToWindow(ServerWindow* target,
129 ClientSpecificId client_id, 130 ClientSpecificId client_id,
130 const ui::Event& event, 131 const ui::Event& event,
131 Accelerator* accelerator) override { 132 Accelerator* accelerator) override {
132 std::unique_ptr<DispatchedEventDetails> details(new DispatchedEventDetails); 133 std::unique_ptr<DispatchedEventDetails> details(new DispatchedEventDetails);
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 // The delegate can decide if it really wants to forward the event or not. 1705 // The delegate can decide if it really wants to forward the event or not.
1705 EXPECT_EQ(child.get(), 1706 EXPECT_EQ(child.get(),
1706 test_event_dispatcher_delegate()->lost_capture_window()); 1707 test_event_dispatcher_delegate()->lost_capture_window());
1707 EXPECT_EQ(child.get(), event_dispatcher()->capture_window()); 1708 EXPECT_EQ(child.get(), event_dispatcher()->capture_window());
1708 EXPECT_EQ(kClientAreaId, event_dispatcher()->capture_window_client_id()); 1709 EXPECT_EQ(kClientAreaId, event_dispatcher()->capture_window_client_id());
1709 } 1710 }
1710 1711
1711 } // namespace test 1712 } // namespace test
1712 } // namespace ws 1713 } // namespace ws
1713 } // namespace ui 1714 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698