| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // This property can only be assigned a non-nil value, and can only be assigned | 90 // This property can only be assigned a non-nil value, and can only be assigned |
| 91 // a value when its current value is nil. | 91 // a value when its current value is nil. |
| 92 @property(nonatomic, assign) ContextualSearchPanelView* panel; | 92 @property(nonatomic, assign) ContextualSearchPanelView* panel; |
| 93 | 93 |
| 94 // Designated initializer. | 94 // Designated initializer. |
| 95 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState | 95 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState |
| 96 delegate:(id<ContextualSearchControllerDelegate>) | 96 delegate:(id<ContextualSearchControllerDelegate>) |
| 97 delegate; | 97 delegate; |
| 98 | 98 |
| 99 // Set the Tab to be used as the opener for the search results tab. |opener|'s | 99 // Set the Tab to be used as the opener for the search results tab. |opener|'s |
| 100 // lifetime should be greater than the reciever's. |opener| can be nil. | 100 // lifetime should be greater than the receiver's. |opener| can be nil. |
| 101 - (void)setTab:(Tab*)tab; | 101 - (void)setTab:(Tab*)tab; |
| 102 | 102 |
| 103 // Enable or disable contextual search for the current WebState. If | 103 // Enable or disable contextual search for the current WebState. If |
| 104 // |enabled| is YES, contextual search may still not be enabled for a number of | 104 // |enabled| is YES, contextual search may still not be enabled for a number of |
| 105 // reasons; the -enabled property will indicate the current status. | 105 // reasons; the -enabled property will indicate the current status. |
| 106 // This method functions asynchronously. | 106 // This method functions asynchronously. |
| 107 - (void)enableContextualSearch:(BOOL)enabled; | 107 - (void)enableContextualSearch:(BOOL)enabled; |
| 108 | 108 |
| 109 // Reset the pane to be offscreen when tabs change. | 109 // Reset the pane to be offscreen when tabs change. |
| 110 - (void)movePanelOffscreen; | 110 - (void)movePanelOffscreen; |
| 111 | 111 |
| 112 // Destroy the receiver. | 112 // Destroy the receiver. |
| 113 // Any following call is not supported. | 113 // Any following call is not supported. |
| 114 - (void)close; | 114 - (void)close; |
| 115 | 115 |
| 116 @end | 116 @end |
| 117 | 117 |
| 118 // Testing category that allows a permissions class to be injected. | 118 // Testing category that allows a permissions class to be injected. |
| 119 @interface ContextualSearchController (Testing) | 119 @interface ContextualSearchController (Testing) |
| 120 | 120 |
| 121 - (void)setPermissions:(TouchToSearchPermissionsMediator*)permissions; | 121 - (void)setPermissions:(TouchToSearchPermissionsMediator*)permissions; |
| 122 | 122 |
| 123 @end | 123 @end |
| 124 | 124 |
| 125 #endif // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_CONTROLLER_
H_ | 125 #endif // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_CONTROLLER_
H_ |
| OLD | NEW |