OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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_TABS_TAB_MODEL_LIST_H_ | 5 #ifndef IOS_CHROME_BROWSER_TABS_TAB_MODEL_LIST_H_ |
6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_LIST_H_ | 6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_LIST_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 // This file contains free functions to help maintain a 1:N relationship | 10 // This file contains free functions to help maintain a 1:N relationship |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Unregisters the association between |tab_model| and |browser_state|. | 27 // Unregisters the association between |tab_model| and |browser_state|. |
28 // It is an error if no such association exists. | 28 // It is an error if no such association exists. |
29 void UnregisterTabModelFromChromeBrowserState( | 29 void UnregisterTabModelFromChromeBrowserState( |
30 ios::ChromeBrowserState* browser_state, | 30 ios::ChromeBrowserState* browser_state, |
31 TabModel* tab_model); | 31 TabModel* tab_model); |
32 | 32 |
33 // Returns the list of all TabModels associated with |browser_state|. | 33 // Returns the list of all TabModels associated with |browser_state|. |
34 NSArray<TabModel*>* GetTabModelsForChromeBrowserState( | 34 NSArray<TabModel*>* GetTabModelsForChromeBrowserState( |
35 ios::ChromeBrowserState* browser_state); | 35 ios::ChromeBrowserState* browser_state); |
36 | 36 |
| 37 // Returns the last active TabModel associated with |browser_state|. |
| 38 TabModel* GetLastActiveTabModelForChromeBrowserState( |
| 39 ios::ChromeBrowserState* browser_state); |
| 40 |
| 41 // Returns true if a incognito session is currently active (i.e. at least |
| 42 // one incognito tab is open). |
| 43 bool IsOffTheRecordSessionActive(); |
| 44 |
37 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_LIST_H_ | 45 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_LIST_H_ |
OLD | NEW |