| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |