| OLD | NEW |
| 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 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_TEST_WINDOW_TREE_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_TEST_WINDOW_TREE_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_TEST_WINDOW_TREE_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_TEST_WINDOW_TREE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/mus/public/interfaces/window_tree.mojom.h" | 9 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 10 | 10 |
| 11 namespace mus { | 11 namespace mus { |
| 12 | 12 |
| 13 // Testing WindowTree implementation. | 13 // Testing WindowTree implementation. |
| 14 class TestWindowTree : public mojom::WindowTree { | 14 class TestWindowTree : public mojom::WindowTree { |
| 15 public: | 15 public: |
| 16 TestWindowTree(); | 16 TestWindowTree(); |
| 17 ~TestWindowTree() override; | 17 ~TestWindowTree() override; |
| 18 | 18 |
| 19 // Returns the most recent change_id supplied to one of the WindowTree | 19 // Returns the most recent change_id supplied to one of the WindowTree |
| 20 // functions. Returns false if one of the WindowTree functions has not been | 20 // functions. Returns false if one of the WindowTree functions has not been |
| 21 // invoked since the last GetAndClearChangeId(). | 21 // invoked since the last GetAndClearChangeId(). |
| 22 bool GetAndClearChangeId(uint32_t* change_id); | 22 bool GetAndClearChangeId(uint32_t* change_id); |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 // mojom::WindowTree: | 25 // mojom::WindowTree: |
| 26 void NewWindow(uint32_t change_id, uint32_t window_id) override; | 26 void NewWindow( |
| 27 uint32_t change_id, |
| 28 uint32_t window_id, |
| 29 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override; |
| 27 void DeleteWindow(uint32_t window_id, | 30 void DeleteWindow(uint32_t window_id, |
| 28 const DeleteWindowCallback& callback) override; | 31 const DeleteWindowCallback& callback) override; |
| 29 void SetWindowBounds(uint32_t change_id, | 32 void SetWindowBounds(uint32_t change_id, |
| 30 uint32_t window_id, | 33 uint32_t window_id, |
| 31 mojo::RectPtr bounds) override; | 34 mojo::RectPtr bounds) override; |
| 32 void SetClientArea(uint32_t window_id, mojo::InsetsPtr insets) override; | 35 void SetClientArea(uint32_t window_id, mojo::InsetsPtr insets) override; |
| 33 void SetWindowVisibility( | 36 void SetWindowVisibility( |
| 34 uint32_t window_id, | 37 uint32_t window_id, |
| 35 bool visible, | 38 bool visible, |
| 36 const SetWindowVisibilityCallback& callback) override; | 39 const SetWindowVisibilityCallback& callback) override; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 77 |
| 75 bool got_change_; | 78 bool got_change_; |
| 76 uint32_t change_id_; | 79 uint32_t change_id_; |
| 77 | 80 |
| 78 DISALLOW_COPY_AND_ASSIGN(TestWindowTree); | 81 DISALLOW_COPY_AND_ASSIGN(TestWindowTree); |
| 79 }; | 82 }; |
| 80 | 83 |
| 81 } // namespace mus | 84 } // namespace mus |
| 82 | 85 |
| 83 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_TEST_WINDOW_TREE_H_ | 86 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_TEST_WINDOW_TREE_H_ |
| OLD | NEW |