OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_STACK_VIEW_STACK_VIEW_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_STACK_VIEW_STACK_VIEW_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_STACK_VIEW_STACK_VIEW_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_STACK_VIEW_STACK_VIEW_CONTROLLER_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.h" | 10 #import "ios/chrome/browser/ui/tab_switcher/tab_switcher.h" |
11 #include "ui/base/page_transition_types.h" | 11 #include "ui/base/page_transition_types.h" |
12 | 12 |
13 class GURL; | 13 class GURL; |
14 @class Tab; | 14 @class Tab; |
15 @class TabModel; | 15 @class TabModel; |
16 | 16 |
17 // A protocol used by the StackViewController for test purposes. | 17 // A protocol used by the StackViewController for test purposes. |
18 @protocol StackViewControllerTestDelegate | 18 @protocol StackViewControllerTestDelegate |
19 // Informs the delegate that the show tab animation starts. | 19 // Informs the delegate that the show tab animation starts. |
20 - (void)stackViewControllerShowWithSelectedTabAnimationDidStart; | 20 - (void)stackViewControllerShowWithSelectedTabAnimationDidStart; |
21 // Informs the delegate that the show tab animation finished. | 21 // Informs the delegate that the show tab animation finished. |
22 - (void)stackViewControllerShowWithSelectedTabAnimationDidEnd; | 22 - (void)stackViewControllerShowWithSelectedTabAnimationDidEnd; |
23 // Informs the delegate that the preload of card views finished. | 23 // Informs the delegate that the preload of card views finished. |
24 - (void)stackViewControllerPreloadCardViewsDidEnd; | 24 - (void)stackViewControllerPreloadCardViewsDidEnd; |
25 @end | 25 @end |
26 | 26 |
27 // Controller for the tab-switching UI displayed as a stack of tabs. | 27 // Controller for the tab-switching UI displayed as a stack of tabs. |
28 @interface StackViewController : UIViewController<TabSwitcher> | 28 @interface StackViewController : UIViewController<TabSwitcher> |
29 | 29 |
30 @property(nonatomic, assign) id<TabSwitcherDelegate> delegate; | 30 @property(nonatomic, weak) id<TabSwitcherDelegate> delegate; |
31 @property(nonatomic, assign) id<StackViewControllerTestDelegate> testDelegate; | 31 @property(nonatomic, weak) id<StackViewControllerTestDelegate> testDelegate; |
32 | 32 |
33 // Initializes with the given tab models, which must not be nil. | 33 // Initializes with the given tab models, which must not be nil. |
34 // |activeTabModel| is the model which starts active, and must be one of the | 34 // |activeTabModel| is the model which starts active, and must be one of the |
35 // other two models. | 35 // other two models. |
36 // TODO(stuartmorgan): Replace the word 'active' in these methods and the | 36 // TODO(stuartmorgan): Replace the word 'active' in these methods and the |
37 // corresponding delegate methods. crbug.com/513782 | 37 // corresponding delegate methods. crbug.com/513782 |
38 - (instancetype)initWithMainTabModel:(TabModel*)mainModel | 38 - (instancetype)initWithMainTabModel:(TabModel*)mainModel |
39 otrTabModel:(TabModel*)otrModel | 39 otrTabModel:(TabModel*)otrModel |
40 activeTabModel:(TabModel*)activeModel; | 40 activeTabModel:(TabModel*)activeModel; |
41 | 41 |
(...skipping 27 matching lines...) Expand all Loading... |
69 // |position| with |transition|. Otherwise, simply returns nil. | 69 // |position| with |transition|. Otherwise, simply returns nil. |
70 // If |position| == NSNotFound the tab will be added at the end of the stack. | 70 // If |position| == NSNotFound the tab will be added at the end of the stack. |
71 - (Tab*)dismissWithNewTabAnimationToModel:(TabModel*)targetModel | 71 - (Tab*)dismissWithNewTabAnimationToModel:(TabModel*)targetModel |
72 withURL:(const GURL&)url | 72 withURL:(const GURL&)url |
73 atIndex:(NSUInteger)position | 73 atIndex:(NSUInteger)position |
74 transition:(ui::PageTransition)transition; | 74 transition:(ui::PageTransition)transition; |
75 | 75 |
76 @end | 76 @end |
77 | 77 |
78 #endif // IOS_CHROME_BROWSER_UI_STACK_VIEW_STACK_VIEW_CONTROLLER_H_ | 78 #endif // IOS_CHROME_BROWSER_UI_STACK_VIEW_STACK_VIEW_CONTROLLER_H_ |
OLD | NEW |