| 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_TAB_SWITCHER_TRANSITION_CONTEXT_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_TRANSITION_CONTEXT_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_TRANSITION_CONTEXT_H_ | 6 #define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_TRANSITION_CONTEXT_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_tab_strip_placeholder_v
iew.h" | 10 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher_tab_strip_placeholder_v
iew.h" |
| 11 | 11 |
| 12 @class TabModel; | 12 @class TabModel; |
| 13 @class BrowserViewController; | 13 @class BrowserViewController; |
| 14 | 14 |
| 15 // Holds the informations about a browser view controller that will be used | 15 // Holds the informations about a browser view controller that will be used |
| 16 // to create the transition from the browser view controller to the tab switcher | 16 // to create the transition from the browser view controller to the tab switcher |
| 17 // and vice versa. | 17 // and vice versa. |
| 18 @interface TabSwitcherTransitionContextContent : NSObject | 18 @interface TabSwitcherTransitionContextContent : NSObject |
| 19 | 19 |
| 20 // Create a transition context content from a browser view controller. | 20 // Create a transition context content from a browser view controller. |
| 21 + (instancetype)tabSwitcherTransitionContextContentFromBVC: | 21 + (instancetype)tabSwitcherTransitionContextContentFromBVC: |
| 22 (BrowserViewController*)bvc; | 22 (BrowserViewController*)bvc; |
| 23 | 23 |
| 24 // Returns an autoreleased placeholder representing the BVC's toolbar. | 24 // Returns an autoreleased placeholder representing the BVC's toolbar. |
| 25 - (TabSwitcherTabStripPlaceholderView*)generateTabStripPlaceholderView; | 25 - (TabSwitcherTabStripPlaceholderView*)generateTabStripPlaceholderView; |
| 26 | 26 |
| 27 // Holds a snapshot view of the browser view controller's toolbar. | 27 // Holds a snapshot view of the browser view controller's toolbar. |
| 28 @property(nonatomic, retain) UIView* toolbarSnapshotView; | 28 @property(nonatomic, retain) UIView* toolbarSnapshotView; |
| 29 | 29 |
| 30 // Index of the selected tab in the browser view controller when the transition | 30 // The tabID that was in the browser view controller when the transition context |
| 31 // context content was created. | 31 // content was created. Used to understand what might have changed in the model |
| 32 @property(nonatomic, assign) NSInteger initialSelectedTabIndex; | 32 // when entering and leaving the tab switcher. |
| 33 @property(nonatomic, copy) NSString* initialTabID; |
| 33 @end | 34 @end |
| 34 | 35 |
| 35 // A Tab switcher transition context holds the informations needed to compute | 36 // A Tab switcher transition context holds the informations needed to compute |
| 36 // the transition from a browser view controller to the tab switcher view | 37 // the transition from a browser view controller to the tab switcher view |
| 37 // controller. | 38 // controller. |
| 38 @interface TabSwitcherTransitionContext : NSObject | 39 @interface TabSwitcherTransitionContext : NSObject |
| 39 | 40 |
| 40 // Create a tab switcher transition context from the current browser view | 41 // Create a tab switcher transition context from the current browser view |
| 41 // controller, the main view controller (regular) and the off the record view | 42 // controller, the main view controller (regular) and the off the record view |
| 42 // controller (incognito). | 43 // controller (incognito). |
| (...skipping 13 matching lines...) Expand all Loading... |
| 56 // record) browser view controller. | 57 // record) browser view controller. |
| 57 @property(nonatomic, retain) | 58 @property(nonatomic, retain) |
| 58 TabSwitcherTransitionContextContent* regularContent; | 59 TabSwitcherTransitionContextContent* regularContent; |
| 59 // The tab model of the broswser view controller selected when the transition | 60 // The tab model of the broswser view controller selected when the transition |
| 60 // context was created. | 61 // context was created. |
| 61 @property(nonatomic, retain) TabModel* initialTabModel; | 62 @property(nonatomic, retain) TabModel* initialTabModel; |
| 62 | 63 |
| 63 @end | 64 @end |
| 64 | 65 |
| 65 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_TRANSITION_CONTEXT_H_ | 66 #endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_TRANSITION_CONTEXT_H_ |
| OLD | NEW |