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

Side by Side Diff: ios/chrome/browser/tabs/tab_model_list.h

Issue 2621083003: Implement 1:N mapping from ios::ChromeBrowserState to TabModel. (Closed)
Patch Set: Use NSMutableSet<TabModel*>* to hold the TabModels. 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
« no previous file with comments | « ios/chrome/browser/tabs/tab_model.mm ('k') | ios/chrome/browser/tabs/tab_model_list.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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_TABS_TAB_MODEL_LIST_H_
6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_LIST_H_
7
8 #import <Foundation/Foundation.h>
9
10 // This file contains free functions to help maintain a 1:N relationship
11 // between an ios::ChromeBrowserState and multiple TabModels.
12
13 @class TabModel;
14
15 namespace ios {
16 class ChromeBrowserState;
17 }
18
19 // Registers |tab_model| as associated to |browser_state|. The object will
20 // be retained until |UnregisterTabModelFromChromeBrowserState| is called.
21 // It is an error if |tab_model is already registered as associated to
22 // |browser_state|.
23 void RegisterTabModelWithChromeBrowserState(
24 ios::ChromeBrowserState* browser_state,
25 TabModel* tab_model);
26
27 // Unregisters the association between |tab_model| and |browser_state|.
28 // It is an error if no such association exists.
29 void UnregisterTabModelFromChromeBrowserState(
30 ios::ChromeBrowserState* browser_state,
31 TabModel* tab_model);
32
33 // Returns the list of all TabModels associated with |browser_state|.
34 NSArray<TabModel*>* GetTabModelsForChromeBrowserState(
35 ios::ChromeBrowserState* browser_state);
36
37 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_LIST_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/tab_model.mm ('k') | ios/chrome/browser/tabs/tab_model_list.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698