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 // ====== New Architecture ===== | 5 // ====== New Architecture ===== |
6 // = This code is only used in the new iOS Chrome architecture. = | 6 // = This code is only used in the new iOS Chrome architecture. = |
7 // ============================================================================ | 7 // ============================================================================ |
8 | 8 |
9 #ifndef IOS_CHROME_BROWSER_BROWSER_COORDINATOR_INTERNAL_H_ | 9 #ifndef IOS_CHROME_BROWSER_BROWSER_COORDINATOR_INTERNAL_H_ |
10 #define IOS_CHROME_BROWSER_BROWSER_COORDINATOR_INTERNAL_H_ | 10 #define IOS_CHROME_BROWSER_BROWSER_COORDINATOR_INTERNAL_H_ |
(...skipping 30 matching lines...) Expand all Loading... |
41 // otherwise. | 41 // otherwise. |
42 @property(nonatomic, readonly) BOOL overlaying; | 42 @property(nonatomic, readonly) BOOL overlaying; |
43 | 43 |
44 // The coordinator (if any) in the coordinator hierarchy (starting with | 44 // The coordinator (if any) in the coordinator hierarchy (starting with |
45 // the receiver) that is overlaying. If the receiver isn't overlaying, | 45 // the receiver) that is overlaying. If the receiver isn't overlaying, |
46 // it recursively asks its children. | 46 // it recursively asks its children. |
47 @property(nonatomic, readonly) BrowserCoordinator* overlayCoordinator; | 47 @property(nonatomic, readonly) BrowserCoordinator* overlayCoordinator; |
48 | 48 |
49 // Adds |coordinator| as a child, taking ownership of it, setting the receiver's | 49 // Adds |coordinator| as a child, taking ownership of it, setting the receiver's |
50 // viewController (if any) as the child's baseViewController, and setting | 50 // viewController (if any) as the child's baseViewController, and setting |
51 // the receiver's browserState as the child's browserState. | 51 // the receiver's |browser| as the child's |browser|. |
52 - (void)addChildCoordinator:(BrowserCoordinator*)coordinator; | 52 - (void)addChildCoordinator:(BrowserCoordinator*)coordinator; |
53 | 53 |
54 // Removes |coordinator| as a child, relinquishing ownership of it. If | 54 // Removes |coordinator| as a child, relinquishing ownership of it. If |
55 // |coordinator| isn't a child of the receiver, this method does nothing. | 55 // |coordinator| isn't a child of the receiver, this method does nothing. |
56 - (void)removeChildCoordinator:(BrowserCoordinator*)coordinator; | 56 - (void)removeChildCoordinator:(BrowserCoordinator*)coordinator; |
57 | 57 |
58 // Methods for adding overlay coordinators. | 58 // Methods for adding overlay coordinators. |
59 | 59 |
60 // Returns YES if the receiver will take |overlayCoordinator| as a child. | 60 // Returns YES if the receiver will take |overlayCoordinator| as a child. |
61 // The default is to return YES only if the receiver has no children, if | 61 // The default is to return YES only if the receiver has no children, if |
62 // the receiver has a nil -overlayCoordinator, and if |overlayCoordinator| | 62 // the receiver has a nil -overlayCoordinator, and if |overlayCoordinator| |
63 // is not already overlaying. | 63 // is not already overlaying. |
64 - (BOOL)canAddOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator; | 64 - (BOOL)canAddOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator; |
65 | 65 |
66 // Adds |overlayCoordinator| as a child to the receiver, or if it cannot be | 66 // Adds |overlayCoordinator| as a child to the receiver, or if it cannot be |
67 // added, recursively add it to the receiver's child. If a receiver has | 67 // added, recursively add it to the receiver's child. If a receiver has |
68 // multiple children and returns YES from -canAddOverlayCoordinator:, it | 68 // multiple children and returns YES from -canAddOverlayCoordinator:, it |
69 // must override this method to determines how the overlay is added. | 69 // must override this method to determines how the overlay is added. |
70 // If neither the receiver or any child can add |overlayCoordinator|, then | 70 // If neither the receiver or any child can add |overlayCoordinator|, then |
71 // nothing happens. | 71 // nothing happens. |
72 - (void)addOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator; | 72 - (void)addOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator; |
73 | 73 |
74 // Removes the current overlay coordinator (if any) as a child from its | 74 // Removes the current overlay coordinator (if any) as a child from its |
75 // parent. | 75 // parent. |
76 - (void)removeOverlayCoordinator; | 76 - (void)removeOverlayCoordinator; |
77 | 77 |
78 @end | 78 @end |
79 | 79 |
80 #endif // IOS_CHROME_BROWSER_BROWSER_COORDINATOR_INTERNAL_H_ | 80 #endif // IOS_CHROME_BROWSER_BROWSER_COORDINATOR_INTERNAL_H_ |
OLD | NEW |