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

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: Fix windows more. Created 4 years, 8 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 "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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 last_accelerator_ = accelerator; 84 last_accelerator_ = accelerator;
85 } 85 }
86 ServerWindow* GetFocusedWindowForEventDispatcher() override { 86 ServerWindow* GetFocusedWindowForEventDispatcher() override {
87 return focused_window_; 87 return focused_window_;
88 } 88 }
89 void SetNativeCapture() override {} 89 void SetNativeCapture() override {}
90 void ReleaseNativeCapture() override {} 90 void ReleaseNativeCapture() override {}
91 void OnServerWindowCaptureLost(ServerWindow* window) override { 91 void OnServerWindowCaptureLost(ServerWindow* window) override {
92 lost_capture_window_ = window; 92 lost_capture_window_ = window;
93 } 93 }
94 void OnMouseCursorLocationChanged(const gfx::Point& point) override {}
94 void DispatchInputEventToWindow(ServerWindow* target, 95 void DispatchInputEventToWindow(ServerWindow* target,
95 bool in_nonclient_area, 96 bool in_nonclient_area,
96 const ui::Event& event, 97 const ui::Event& event,
97 Accelerator* accelerator) override { 98 Accelerator* accelerator) override {
98 scoped_ptr<DispatchedEventDetails> details(new DispatchedEventDetails); 99 scoped_ptr<DispatchedEventDetails> details(new DispatchedEventDetails);
99 details->window = target; 100 details->window = target;
100 details->in_nonclient_area = in_nonclient_area; 101 details->in_nonclient_area = in_nonclient_area;
101 details->event = ui::Event::Clone(event); 102 details->event = ui::Event::Clone(event);
102 details->accelerator = accelerator; 103 details->accelerator = accelerator;
103 dispatched_event_queue_.push(std::move(details)); 104 dispatched_event_queue_.push(std::move(details));
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 w1->AddTransientWindow(w2.get()); 1335 w1->AddTransientWindow(w2.get());
1335 w2->SetModal(); 1336 w2->SetModal();
1336 1337
1337 EXPECT_TRUE(event_dispatcher()->SetCaptureWindow(w3.get(), false)); 1338 EXPECT_TRUE(event_dispatcher()->SetCaptureWindow(w3.get(), false));
1338 EXPECT_EQ(w3.get(), event_dispatcher()->capture_window()); 1339 EXPECT_EQ(w3.get(), event_dispatcher()->capture_window());
1339 } 1340 }
1340 1341
1341 } // namespace test 1342 } // namespace test
1342 } // namespace ws 1343 } // namespace ws
1343 } // namespace mus 1344 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698