OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_CONTROLLER_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include "base/ios/block_types.h" | 10 #include "base/ios/block_types.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // Only tests should set this directly; for general use, use -setTab:, which | 85 // Only tests should set this directly; for general use, use -setTab:, which |
86 // will set this property with the tab's webState. | 86 // will set this property with the tab's webState. |
87 @property(nonatomic, assign) web::WebState* webState; | 87 @property(nonatomic, assign) web::WebState* webState; |
88 | 88 |
89 // The panel view that this controller should populate with subviews and use. | 89 // The panel view that this controller should populate with subviews and use. |
90 // Owned by its superview. Setting this will have the controller create subviews | 90 // Owned by its superview. Setting this will have the controller create subviews |
91 // for the panel; code that sets this property is responsible for disposing of | 91 // for the panel; code that sets this property is responsible for disposing of |
92 // the old panel and its views. | 92 // the old panel and its views. |
93 // This property can only be assigned a non-nil value, and can only be assigned | 93 // This property can only be assigned a non-nil value, and can only be assigned |
94 // a value when its current value is nil. | 94 // a value when its current value is nil. |
95 @property(nonatomic, assign) ContextualSearchPanelView* panel; | 95 @property(nonatomic, weak) ContextualSearchPanelView* panel; |
96 | 96 |
97 // Designated initializer. | 97 // Designated initializer. |
98 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState | 98 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState |
99 delegate:(id<ContextualSearchControllerDelegate>) | 99 delegate:(id<ContextualSearchControllerDelegate>) |
100 delegate; | 100 delegate; |
101 | 101 |
102 // Set the Tab to be used as the opener for the search results tab. |opener|'s | 102 // Set the Tab to be used as the opener for the search results tab. |opener|'s |
103 // lifetime should be greater than the receiver's. |opener| can be nil. | 103 // lifetime should be greater than the receiver's. |opener| can be nil. |
104 - (void)setTab:(Tab*)tab; | 104 - (void)setTab:(Tab*)tab; |
105 | 105 |
(...skipping 13 matching lines...) Expand all Loading... |
119 @end | 119 @end |
120 | 120 |
121 // Testing category that allows a permissions class to be injected. | 121 // Testing category that allows a permissions class to be injected. |
122 @interface ContextualSearchController (Testing) | 122 @interface ContextualSearchController (Testing) |
123 | 123 |
124 - (void)setPermissions:(TouchToSearchPermissionsMediator*)permissions; | 124 - (void)setPermissions:(TouchToSearchPermissionsMediator*)permissions; |
125 | 125 |
126 @end | 126 @end |
127 | 127 |
128 #endif // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_CONTROLLER_
H_ | 128 #endif // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_CONTROLLER_
H_ |
OLD | NEW |