Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 function to help maintain 1:N relationship | |
|
marq (ping after 24h)
2017/01/11 15:56:47
"free functions to help maintain a 1:N relationshi
sdefresne
2017/01/11 16:14:42
Done.
| |
| 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. | |
|
marq (ping after 24h)
2017/01/11 15:56:47
Add: "it is an error if |tab_model is already regi
sdefresne
2017/01/11 16:14:42
Done.
| |
| 21 void RegisterTabModelWithChromeBrowserState( | |
| 22 ios::ChromeBrowserState* browser_state, | |
| 23 TabModel* tab_model); | |
| 24 | |
| 25 // Unregisters the association between |tab_model| and |browser_state|. | |
| 26 // It is an error if no such association exists. | |
| 27 void UnregisterTabModelFromChromeBrowserState( | |
| 28 ios::ChromeBrowserState* browser_state, | |
| 29 TabModel* tab_model); | |
| 30 | |
| 31 // Returns the list of all TabModels associated with |browser_state|. | |
| 32 NSArray<TabModel*>* GetTabModelsForChromeBrowserState( | |
| 33 ios::ChromeBrowserState* browser_state); | |
| 34 | |
| 35 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_LIST_H_ | |
| OLD | NEW |