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

Side by Side Diff: services/ui/ws/test_utils.h

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/display.cc ('k') | services/ui/ws/test_utils.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef SERVICES_UI_WS_TEST_UTILS_H_ 5 #ifndef SERVICES_UI_WS_TEST_UTILS_H_
6 #define SERVICES_UI_WS_TEST_UTILS_H_ 6 #define SERVICES_UI_WS_TEST_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 const ui::Event& event, 200 const ui::Event& event,
201 Accelerator* accelerator) { 201 Accelerator* accelerator) {
202 wms_->DispatchInputEventToWindow(target, client_id, event, accelerator); 202 wms_->DispatchInputEventToWindow(target, client_id, event, accelerator);
203 } 203 }
204 204
205 ClientSpecificId GetEventTargetClientId(ServerWindow* window, 205 ClientSpecificId GetEventTargetClientId(ServerWindow* window,
206 bool in_nonclient_area) { 206 bool in_nonclient_area) {
207 return wms_->GetEventTargetClientId(window, in_nonclient_area); 207 return wms_->GetEventTargetClientId(window, in_nonclient_area);
208 } 208 }
209 209
210 void ProcessEvent(const ui::Event& event) { wms_->ProcessEvent(event); } 210 void ProcessEvent(const ui::Event& event, int64_t display_id = 0) {
211 wms_->ProcessEvent(event, display_id);
212 }
211 213
212 void OnEventAckTimeout(ClientSpecificId client_id) { 214 void OnEventAckTimeout(ClientSpecificId client_id) {
213 wms_->OnEventAckTimeout(client_id); 215 wms_->OnEventAckTimeout(client_id);
214 } 216 }
215 217
216 ClientSpecificId GetEventTargetClientId(const ServerWindow* window, 218 ClientSpecificId GetEventTargetClientId(const ServerWindow* window,
217 bool in_nonclient_area) { 219 bool in_nonclient_area) {
218 return wms_->GetEventTargetClientId(window, in_nonclient_area); 220 return wms_->GetEventTargetClientId(window, in_nonclient_area);
219 } 221 }
220 222
221 WindowTree* tree_awaiting_input_ack() { 223 WindowTree* tree_awaiting_input_ack() {
222 return wms_->tree_awaiting_input_ack_; 224 return wms_->in_flight_event_details_ ? wms_->in_flight_event_details_->tree
225 : nullptr;
223 } 226 }
224 227
225 private: 228 private:
226 WindowManagerState* wms_; 229 WindowManagerState* wms_;
227 230
228 DISALLOW_COPY_AND_ASSIGN(WindowManagerStateTestApi); 231 DISALLOW_COPY_AND_ASSIGN(WindowManagerStateTestApi);
229 }; 232 };
230 233
231 // ----------------------------------------------------------------------------- 234 // -----------------------------------------------------------------------------
232 235
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 void OnWindowOpacityChanged(uint32_t window, 438 void OnWindowOpacityChanged(uint32_t window,
436 float old_opacity, 439 float old_opacity,
437 float new_opacity) override; 440 float new_opacity) override;
438 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override; 441 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override;
439 void OnWindowSharedPropertyChanged( 442 void OnWindowSharedPropertyChanged(
440 uint32_t window, 443 uint32_t window,
441 const std::string& name, 444 const std::string& name,
442 const base::Optional<std::vector<uint8_t>>& new_data) override; 445 const base::Optional<std::vector<uint8_t>>& new_data) override;
443 void OnWindowInputEvent(uint32_t event_id, 446 void OnWindowInputEvent(uint32_t event_id,
444 uint32_t window, 447 uint32_t window,
448 int64_t display_id,
445 std::unique_ptr<ui::Event> event, 449 std::unique_ptr<ui::Event> event,
446 bool matches_pointer_watcher) override; 450 bool matches_pointer_watcher) override;
447 void OnPointerEventObserved(std::unique_ptr<ui::Event> event, 451 void OnPointerEventObserved(std::unique_ptr<ui::Event> event,
448 uint32_t window_id) override; 452 uint32_t window_id,
453 int64_t display_id) override;
449 void OnWindowFocused(uint32_t focused_window_id) override; 454 void OnWindowFocused(uint32_t focused_window_id) override;
450 void OnWindowPredefinedCursorChanged(uint32_t window_id, 455 void OnWindowPredefinedCursorChanged(uint32_t window_id,
451 mojom::Cursor cursor_id) override; 456 mojom::Cursor cursor_id) override;
452 void OnWindowSurfaceChanged(Id window_id, 457 void OnWindowSurfaceChanged(Id window_id,
453 const cc::SurfaceInfo& surface_info) override; 458 const cc::SurfaceInfo& surface_info) override;
454 void OnDragDropStart( 459 void OnDragDropStart(
455 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data) 460 const std::unordered_map<std::string, std::vector<uint8_t>>& mime_data)
456 override; 461 override;
457 void OnDragEnter(uint32_t window, 462 void OnDragEnter(uint32_t window,
458 uint32_t key_state, 463 uint32_t key_state,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); 683 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id);
679 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, 684 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
680 ServerWindow* parent, 685 ServerWindow* parent,
681 ClientWindowId* client_id = nullptr); 686 ClientWindowId* client_id = nullptr);
682 687
683 } // namespace test 688 } // namespace test
684 } // namespace ws 689 } // namespace ws
685 } // namespace ui 690 } // namespace ui
686 691
687 #endif // SERVICES_UI_WS_TEST_UTILS_H_ 692 #endif // SERVICES_UI_WS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698