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_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_RESULTS_VIEW_H
_ | 5 #ifndef IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_RESULTS_VIEW_H
_ |
6 #define IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_RESULTS_VIEW_H
_ | 6 #define IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_RESULTS_VIEW_H
_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h" | 10 #import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // YES if it's OK to preload search results. | 25 // YES if it's OK to preload search results. |
26 - (BOOL)canPreloadSearchResults; | 26 - (BOOL)canPreloadSearchResults; |
27 @end | 27 @end |
28 | 28 |
29 @interface ContextualSearchResultsView | 29 @interface ContextualSearchResultsView |
30 : UIView<ContextualSearchPanelMotionObserver, | 30 : UIView<ContextualSearchPanelMotionObserver, |
31 ContextualSearchPanelScrollSynchronizer, | 31 ContextualSearchPanelScrollSynchronizer, |
32 ContextualSearchTabProvider> | 32 ContextualSearchTabProvider> |
33 @property(nonatomic, assign) BOOL active; | 33 @property(nonatomic, assign) BOOL active; |
34 // The tab that is credited with opening the search results tab. | 34 // The tab that is credited with opening the search results tab. |
35 @property(nonatomic, assign) Tab* opener; | 35 @property(nonatomic, weak) Tab* opener; |
36 // Object that can handle promoting the search results. | 36 // Object that can handle promoting the search results. |
37 @property(nonatomic, assign) id<ContextualSearchTabPromoter> promoter; | 37 @property(nonatomic, weak) id<ContextualSearchTabPromoter> promoter; |
38 // Object that can determine if search results can be preloaded. | 38 // Object that can determine if search results can be preloaded. |
39 @property(nonatomic, assign) id<ContextualSearchPreloadChecker> preloadChecker; | 39 @property(nonatomic, weak) id<ContextualSearchPreloadChecker> preloadChecker; |
40 // YES if the search results have loaded and this view was visible. | 40 // YES if the search results have loaded and this view was visible. |
41 @property(nonatomic, readonly) BOOL contentVisible; | 41 @property(nonatomic, readonly) BOOL contentVisible; |
42 | 42 |
43 // Creates an new (internal) Tab object loading |url|; if |preloadEnabled| is | 43 // Creates an new (internal) Tab object loading |url|; if |preloadEnabled| is |
44 // YES, then this tab will start loading as soon as possible, otherwise it will | 44 // YES, then this tab will start loading as soon as possible, otherwise it will |
45 // start loading as soon as this view becomes visible. | 45 // start loading as soon as this view becomes visible. |
46 - (void)createTabForSearch:(GURL)url preloadEnabled:(BOOL)preloadEnabled; | 46 - (void)createTabForSearch:(GURL)url preloadEnabled:(BOOL)preloadEnabled; |
47 | 47 |
48 // Scroll the search results tab content so the top of the loaded page is | 48 // Scroll the search results tab content so the top of the loaded page is |
49 // visible. | 49 // visible. |
50 - (void)scrollToTopAnimated:(BOOL)animated; | 50 - (void)scrollToTopAnimated:(BOOL)animated; |
51 | 51 |
52 // Record metrics for the loaded search results having finished, marking them | 52 // Record metrics for the loaded search results having finished, marking them |
53 // as 'chained' or not according to |chained|. | 53 // as 'chained' or not according to |chained|. |
54 - (void)recordFinishedSearchChained:(BOOL)chained; | 54 - (void)recordFinishedSearchChained:(BOOL)chained; |
55 | 55 |
56 @end | 56 @end |
57 | 57 |
58 #endif // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_RESULTS_VIE
W_H_ | 58 #endif // IOS_CHROME_BROWSER_UI_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_RESULTS_VIE
W_H_ |
OLD | NEW |