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

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

Issue 2685883003: chromeos: converts observed pointer events to DIPs (Closed)
Patch Set: merge Created 3 years, 10 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 | « services/ui/ws/window_tree.cc ('k') | ui/aura/mus/window_tree_client.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 void OnWindowOpacityChanged(uint32_t window, 345 void OnWindowOpacityChanged(uint32_t window,
346 float old_opacity, 346 float old_opacity,
347 float new_opacity) override { 347 float new_opacity) override {
348 tracker()->OnWindowOpacityChanged(window, new_opacity); 348 tracker()->OnWindowOpacityChanged(window, new_opacity);
349 } 349 }
350 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override { 350 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override {
351 tracker()->OnWindowParentDrawnStateChanged(window, drawn); 351 tracker()->OnWindowParentDrawnStateChanged(window, drawn);
352 } 352 }
353 void OnWindowInputEvent(uint32_t event_id, 353 void OnWindowInputEvent(uint32_t event_id,
354 Id window_id, 354 Id window_id,
355 int64_t display_id,
355 std::unique_ptr<ui::Event> event, 356 std::unique_ptr<ui::Event> event,
356 bool matches_pointer_watcher) override { 357 bool matches_pointer_watcher) override {
357 // Ack input events to clear the state on the server. These can be received 358 // Ack input events to clear the state on the server. These can be received
358 // during test startup. X11Window::DispatchEvent sends a synthetic move 359 // during test startup. X11Window::DispatchEvent sends a synthetic move
359 // event to notify of entry. 360 // event to notify of entry.
360 tree()->OnWindowInputEventAck(event_id, mojom::EventResult::HANDLED); 361 tree()->OnWindowInputEventAck(event_id, mojom::EventResult::HANDLED);
361 // Don't log input events as none of the tests care about them and they 362 // Don't log input events as none of the tests care about them and they
362 // may come in at random points. 363 // may come in at random points.
363 } 364 }
364 void OnPointerEventObserved(std::unique_ptr<ui::Event>, 365 void OnPointerEventObserved(std::unique_ptr<ui::Event>,
365 uint32_t window_id) override {} 366 uint32_t window_id,
367 int64_t display_id) override {}
366 void OnWindowSharedPropertyChanged( 368 void OnWindowSharedPropertyChanged(
367 uint32_t window, 369 uint32_t window,
368 const std::string& name, 370 const std::string& name,
369 const base::Optional<std::vector<uint8_t>>& new_data) override { 371 const base::Optional<std::vector<uint8_t>>& new_data) override {
370 tracker_.OnWindowSharedPropertyChanged(window, name, new_data); 372 tracker_.OnWindowSharedPropertyChanged(window, name, new_data);
371 } 373 }
372 // TODO(sky): add testing coverage. 374 // TODO(sky): add testing coverage.
373 void OnWindowFocused(uint32_t focused_window_id) override {} 375 void OnWindowFocused(uint32_t focused_window_id) override {}
374 void OnWindowPredefinedCursorChanged(uint32_t window_id, 376 void OnWindowPredefinedCursorChanged(uint32_t window_id,
375 mojom::Cursor cursor_id) override { 377 mojom::Cursor cursor_id) override {
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 2225
2224 // TODO(sky): make sure coverage of what was 2226 // TODO(sky): make sure coverage of what was
2225 // WindowManagerTest.SecondEmbedRoot_InitService and 2227 // WindowManagerTest.SecondEmbedRoot_InitService and
2226 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window 2228 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window
2227 // manager 2229 // manager
2228 // tests. 2230 // tests.
2229 2231
2230 } // namespace test 2232 } // namespace test
2231 } // namespace ws 2233 } // namespace ws
2232 } // namespace ui 2234 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree.cc ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698