OLD | NEW |
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 #ifndef MOJO_SERVICES_VIEW_MANAGER_TEST_CHANGE_TRACKER_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_TEST_CHANGE_TRACKER_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_TEST_CHANGE_TRACKER_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_TEST_CHANGE_TRACKER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 }; | 56 }; |
57 | 57 |
58 // Converts Changes to string descriptions. | 58 // Converts Changes to string descriptions. |
59 std::vector<std::string> ChangesToDescription1( | 59 std::vector<std::string> ChangesToDescription1( |
60 const std::vector<Change>& changes); | 60 const std::vector<Change>& changes); |
61 | 61 |
62 // Returns a string description of |changes[0].nodes|. Returns an empty string | 62 // Returns a string description of |changes[0].nodes|. Returns an empty string |
63 // if change.size() != 1. | 63 // if change.size() != 1. |
64 std::string ChangeNodeDescription(const std::vector<Change>& changes); | 64 std::string ChangeNodeDescription(const std::vector<Change>& changes); |
65 | 65 |
| 66 // Converts INodes to TestNodes. |
| 67 void INodesToTestNodes(const Array<INodePtr>& data, |
| 68 std::vector<TestNode>* test_nodes); |
| 69 |
66 // TestChangeTracker is used to record IViewManagerClient functions. It notifies | 70 // TestChangeTracker is used to record IViewManagerClient functions. It notifies |
67 // a delegate any time a change is added. | 71 // a delegate any time a change is added. |
68 class TestChangeTracker { | 72 class TestChangeTracker { |
69 public: | 73 public: |
70 // Used to notify the delegate when a change is added. A change corresponds to | 74 // Used to notify the delegate when a change is added. A change corresponds to |
71 // a single IViewManagerClient function. | 75 // a single IViewManagerClient function. |
72 class Delegate { | 76 class Delegate { |
73 public: | 77 public: |
74 virtual void OnChangeAdded() = 0; | 78 virtual void OnChangeAdded() = 0; |
75 | 79 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 std::vector<Change> changes_; | 117 std::vector<Change> changes_; |
114 | 118 |
115 DISALLOW_COPY_AND_ASSIGN(TestChangeTracker); | 119 DISALLOW_COPY_AND_ASSIGN(TestChangeTracker); |
116 }; | 120 }; |
117 | 121 |
118 } // namespace service | 122 } // namespace service |
119 } // namespace view_manager | 123 } // namespace view_manager |
120 } // namespace mojo | 124 } // namespace mojo |
121 | 125 |
122 #endif // MOJO_SERVICES_VIEW_MANAGER_TEST_CHANGE_TRACKER_H_ | 126 #endif // MOJO_SERVICES_VIEW_MANAGER_TEST_CHANGE_TRACKER_H_ |
OLD | NEW |