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 IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_ |
6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_ | 6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 namespace ios_internal { | |
11 | |
12 // This structure represents the changes a session undergoes. | 10 // This structure represents the changes a session undergoes. |
13 // It is used to update the UICollectionView showing a set of tabs. | 11 // It is used to update the UICollectionView showing a set of tabs. |
14 class SessionChanges { | 12 class SessionChanges { |
15 public: | 13 public: |
16 SessionChanges(std::vector<size_t> const& tabHashesInInitialState, | 14 SessionChanges(std::vector<size_t> const& tabHashesInInitialState, |
17 std::vector<size_t> const& tabHashesInFinalState); | 15 std::vector<size_t> const& tabHashesInFinalState); |
18 ~SessionChanges(); | 16 ~SessionChanges(); |
19 SessionChanges(const SessionChanges& sessionChanges) = delete; | 17 SessionChanges(const SessionChanges& sessionChanges) = delete; |
20 SessionChanges& operator=(const SessionChanges& sessionChanges) = delete; | 18 SessionChanges& operator=(const SessionChanges& sessionChanges) = delete; |
21 | 19 |
(...skipping 12 matching lines...) Expand all Loading... |
34 // session. | 32 // session. |
35 // -the indexes in |deletions| are relative to the previous state of the | 33 // -the indexes in |deletions| are relative to the previous state of the |
36 // session. | 34 // session. |
37 // -the indexes in |insertions| are relative to the final state of the | 35 // -the indexes in |insertions| are relative to the final state of the |
38 // session. | 36 // session. |
39 std::vector<size_t> deletions_; | 37 std::vector<size_t> deletions_; |
40 std::vector<size_t> insertions_; | 38 std::vector<size_t> insertions_; |
41 std::vector<size_t> updates_; | 39 std::vector<size_t> updates_; |
42 }; | 40 }; |
43 | 41 |
44 } // namespace ios_internal | |
45 | |
46 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_ | 42 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_ |
OLD | NEW |