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

Side by Side Diff: components/mus/ws/event_dispatcher_unittest.cc

Issue 1881253002: mus: Implement ScreenMus::GetCursorScreenPoint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with tot Created 4 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
« no previous file with comments | « components/mus/ws/event_dispatcher_delegate.h ('k') | components/mus/ws/user_display_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/mus/ws/event_dispatcher.h" 5 #include "components/mus/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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 last_accelerator_ = accelerator; 89 last_accelerator_ = accelerator;
90 } 90 }
91 ServerWindow* GetFocusedWindowForEventDispatcher() override { 91 ServerWindow* GetFocusedWindowForEventDispatcher() override {
92 return focused_window_; 92 return focused_window_;
93 } 93 }
94 void SetNativeCapture() override {} 94 void SetNativeCapture() override {}
95 void ReleaseNativeCapture() override {} 95 void ReleaseNativeCapture() override {}
96 void OnServerWindowCaptureLost(ServerWindow* window) override { 96 void OnServerWindowCaptureLost(ServerWindow* window) override {
97 lost_capture_window_ = window; 97 lost_capture_window_ = window;
98 } 98 }
99 void OnMouseCursorLocationChanged(const gfx::Point& point) override {}
99 void DispatchInputEventToWindow(ServerWindow* target, 100 void DispatchInputEventToWindow(ServerWindow* target,
100 bool in_nonclient_area, 101 bool in_nonclient_area,
101 const ui::Event& event, 102 const ui::Event& event,
102 Accelerator* accelerator) override { 103 Accelerator* accelerator) override {
103 std::unique_ptr<DispatchedEventDetails> details(new DispatchedEventDetails); 104 std::unique_ptr<DispatchedEventDetails> details(new DispatchedEventDetails);
104 details->window = target; 105 details->window = target;
105 details->in_nonclient_area = in_nonclient_area; 106 details->in_nonclient_area = in_nonclient_area;
106 details->event = ui::Event::Clone(event); 107 details->event = ui::Event::Clone(event);
107 details->accelerator = accelerator; 108 details->accelerator = accelerator;
108 dispatched_event_queue_.push(std::move(details)); 109 dispatched_event_queue_.push(std::move(details));
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 w1->AddTransientWindow(w2.get()); 1364 w1->AddTransientWindow(w2.get());
1364 w2->SetModal(); 1365 w2->SetModal();
1365 1366
1366 EXPECT_TRUE(event_dispatcher()->SetCaptureWindow(w3.get(), false)); 1367 EXPECT_TRUE(event_dispatcher()->SetCaptureWindow(w3.get(), false));
1367 EXPECT_EQ(w3.get(), event_dispatcher()->capture_window()); 1368 EXPECT_EQ(w3.get(), event_dispatcher()->capture_window());
1368 } 1369 }
1369 1370
1370 } // namespace test 1371 } // namespace test
1371 } // namespace ws 1372 } // namespace ws
1372 } // namespace mus 1373 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/event_dispatcher_delegate.h ('k') | components/mus/ws/user_display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698