| OLD | NEW |
| 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 COMPONENTS_MUS_WS_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ | 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 WindowTreeTestApi(WindowTree* tree); | 69 WindowTreeTestApi(WindowTree* tree); |
| 70 ~WindowTreeTestApi(); | 70 ~WindowTreeTestApi(); |
| 71 | 71 |
| 72 void set_window_manager_internal(mojom::WindowManager* wm_internal) { | 72 void set_window_manager_internal(mojom::WindowManager* wm_internal) { |
| 73 tree_->window_manager_internal_ = wm_internal; | 73 tree_->window_manager_internal_ = wm_internal; |
| 74 } | 74 } |
| 75 | 75 |
| 76 void ClearAck() { tree_->event_ack_id_ = 0; } | 76 void ClearAck() { tree_->event_ack_id_ = 0; } |
| 77 void EnableCapture() { tree_->event_ack_id_ = 1u; } | 77 void EnableCapture() { tree_->event_ack_id_ = 1u; } |
| 78 | 78 |
| 79 void SetEventObserver(mojom::EventMatcherPtr matcher); |
| 80 void ClearEventObserver(); |
| 81 |
| 79 private: | 82 private: |
| 80 WindowTree* tree_; | 83 WindowTree* tree_; |
| 81 | 84 |
| 82 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi); | 85 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi); |
| 83 }; | 86 }; |
| 84 | 87 |
| 85 // ----------------------------------------------------------------------------- | 88 // ----------------------------------------------------------------------------- |
| 86 | 89 |
| 87 class DisplayTestApi { | 90 class DisplayTestApi { |
| 88 public: | 91 public: |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 void OnWindowOpacityChanged(uint32_t window, | 286 void OnWindowOpacityChanged(uint32_t window, |
| 284 float old_opacity, | 287 float old_opacity, |
| 285 float new_opacity) override; | 288 float new_opacity) override; |
| 286 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override; | 289 void OnWindowParentDrawnStateChanged(uint32_t window, bool drawn) override; |
| 287 void OnWindowSharedPropertyChanged(uint32_t window, | 290 void OnWindowSharedPropertyChanged(uint32_t window, |
| 288 const mojo::String& name, | 291 const mojo::String& name, |
| 289 mojo::Array<uint8_t> new_data) override; | 292 mojo::Array<uint8_t> new_data) override; |
| 290 void OnWindowInputEvent(uint32_t event_id, | 293 void OnWindowInputEvent(uint32_t event_id, |
| 291 uint32_t window, | 294 uint32_t window, |
| 292 mojom::EventPtr event) override; | 295 mojom::EventPtr event) override; |
| 296 void OnEventObserved(mojom::EventPtr event) override; |
| 293 void OnWindowFocused(uint32_t focused_window_id) override; | 297 void OnWindowFocused(uint32_t focused_window_id) override; |
| 294 void OnWindowPredefinedCursorChanged(uint32_t window_id, | 298 void OnWindowPredefinedCursorChanged(uint32_t window_id, |
| 295 mojom::Cursor cursor_id) override; | 299 mojom::Cursor cursor_id) override; |
| 296 void OnChangeCompleted(uint32_t change_id, bool success) override; | 300 void OnChangeCompleted(uint32_t change_id, bool success) override; |
| 297 void RequestClose(uint32_t window_id) override; | 301 void RequestClose(uint32_t window_id) override; |
| 298 void GetWindowManager( | 302 void GetWindowManager( |
| 299 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) override; | 303 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) override; |
| 300 | 304 |
| 301 TestChangeTracker tracker_; | 305 TestChangeTracker tracker_; |
| 302 mojo::Binding<mojom::WindowTreeClient> binding_; | 306 mojo::Binding<mojom::WindowTreeClient> binding_; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 404 |
| 401 // Creates a new visible window as a child of the single root of |tree|. | 405 // Creates a new visible window as a child of the single root of |tree|. |
| 402 // |client_id| set to the ClientWindowId of the new window. | 406 // |client_id| set to the ClientWindowId of the new window. |
| 403 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 407 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
| 404 | 408 |
| 405 } // namespace test | 409 } // namespace test |
| 406 } // namespace ws | 410 } // namespace ws |
| 407 } // namespace mus | 411 } // namespace mus |
| 408 | 412 |
| 409 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ | 413 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| OLD | NEW |