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

Side by Side Diff: components/mus/public/cpp/tests/test_window_tree.h

Issue 1567623003: Adds remainder of support for multiple roots to WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 4 years, 11 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 #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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/mus/public/interfaces/window_tree.mojom.h" 13 #include "components/mus/public/interfaces/window_tree.mojom.h"
14 14
15 namespace mus { 15 namespace mus {
16 16
17 // Testing WindowTree implementation. 17 // Testing WindowTree implementation.
18 class TestWindowTree : public mojom::WindowTree { 18 class TestWindowTree : public mojom::WindowTree {
19 public: 19 public:
20 TestWindowTree(); 20 TestWindowTree();
21 ~TestWindowTree() override; 21 ~TestWindowTree() override;
22 22
23 // Returns the most recent change_id supplied to one of the WindowTree 23 // Returns the most recent change_id supplied to one of the WindowTree
24 // functions. Returns false if one of the WindowTree functions has not been 24 // functions. Returns false if one of the WindowTree functions has not been
25 // invoked since the last GetAndClearChangeId(). 25 // invoked since the last GetAndClearChangeId().
26 bool GetAndClearChangeId(uint32_t* change_id); 26 bool GetAndClearChangeId(uint32_t* change_id);
27 27
28 uint32_t window_id() const { return window_id_; }
29
28 bool WasEventAcked(uint32_t event_id) const; 30 bool WasEventAcked(uint32_t event_id) const;
29 31
30 private: 32 private:
31 // mojom::WindowTree: 33 // mojom::WindowTree:
32 void NewWindow( 34 void NewWindow(
33 uint32_t change_id, 35 uint32_t change_id,
34 uint32_t window_id, 36 uint32_t window_id,
35 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override; 37 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override;
38 void NewTopLevelWindow(
39 uint32_t change_id,
40 uint32_t window_id,
41 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override;
36 void DeleteWindow(uint32_t change_id, uint32_t window_id) override; 42 void DeleteWindow(uint32_t change_id, uint32_t window_id) override;
37 void SetWindowBounds(uint32_t change_id, 43 void SetWindowBounds(uint32_t change_id,
38 uint32_t window_id, 44 uint32_t window_id,
39 mojo::RectPtr bounds) override; 45 mojo::RectPtr bounds) override;
40 void SetClientArea( 46 void SetClientArea(
41 uint32_t window_id, 47 uint32_t window_id,
42 mojo::InsetsPtr insets, 48 mojo::InsetsPtr insets,
43 mojo::Array<mojo::RectPtr> additional_client_areas) override; 49 mojo::Array<mojo::RectPtr> additional_client_areas) override;
44 void SetWindowVisibility(uint32_t change_id, 50 void SetWindowVisibility(uint32_t change_id,
45 uint32_t window_id, 51 uint32_t window_id,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 bool visible, 86 bool visible,
81 mojo::TextInputStatePtr state) override; 87 mojo::TextInputStatePtr state) override;
82 void OnWindowInputEventAck(uint32_t event_id) override; 88 void OnWindowInputEventAck(uint32_t event_id) override;
83 void GetWindowManagerInternalClient( 89 void GetWindowManagerInternalClient(
84 mojo::AssociatedInterfaceRequest<mojom::WindowManagerInternalClient> 90 mojo::AssociatedInterfaceRequest<mojom::WindowManagerInternalClient>
85 internal) override; 91 internal) override;
86 92
87 bool got_change_; 93 bool got_change_;
88 uint32_t change_id_; 94 uint32_t change_id_;
89 std::set<uint32_t> acked_events_; 95 std::set<uint32_t> acked_events_;
96 uint32_t window_id_;
90 97
91 DISALLOW_COPY_AND_ASSIGN(TestWindowTree); 98 DISALLOW_COPY_AND_ASSIGN(TestWindowTree);
92 }; 99 };
93 100
94 } // namespace mus 101 } // namespace mus
95 102
96 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_TEST_WINDOW_TREE_H_ 103 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_TEST_WINDOW_TREE_H_
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/window_tree_client_impl.cc ('k') | components/mus/public/cpp/tests/test_window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698