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

Side by Side Diff: ios/chrome/browser/ui/tab_switcher/session_changes.h

Issue 2612733004: Renames SessionChanges and SessionCellData to have a TabSwitcher prefix. (Closed)
Patch Set: Created 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_
6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_
7
8 #include <vector>
9
10 // This structure represents the changes a session undergoes.
11 // It is used to update the UICollectionView showing a set of tabs.
12 class SessionChanges {
13 public:
14 SessionChanges(std::vector<size_t> const& tabHashesInInitialState,
15 std::vector<size_t> const& tabHashesInFinalState);
16 ~SessionChanges();
17 SessionChanges(const SessionChanges& sessionChanges) = delete;
18 SessionChanges& operator=(const SessionChanges& sessionChanges) = delete;
19
20 std::vector<size_t> const& deletions() const;
21 std::vector<size_t> const& insertions() const;
22 std::vector<size_t> const& updates() const;
23
24 bool hasChanges() const;
25
26 private:
27 // Those vectors contain indexes of tabs.
28 // The indexes are relative to a tab model snapshot, or a distant session.
29 // To be in accordance with the UICollectionView's |performBatchUpdates|
30 // method:
31 // -the indexes in |updates| are relative to the previous state of the
32 // session.
33 // -the indexes in |deletions| are relative to the previous state of the
34 // session.
35 // -the indexes in |insertions| are relative to the final state of the
36 // session.
37 std::vector<size_t> deletions_;
38 std::vector<size_t> insertions_;
39 std::vector<size_t> updates_;
40 };
41
42 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_SESSION_CHANGES_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/tab_switcher/BUILD.gn ('k') | ios/chrome/browser/ui/tab_switcher/session_changes.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698