OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_ | 5 #ifndef IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_ |
6 #define IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_ | 6 #define IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_ |
7 | 7 |
8 #include <CoreGraphics/CoreGraphics.h> | 8 #include <CoreGraphics/CoreGraphics.h> |
9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
10 | 10 |
11 // This is a simplified version of find_tab_helper.cc. | 11 // This is a simplified version of find_tab_helper.cc. |
12 @interface FindInPageModel : NSObject | 12 @interface FindInPageModel : NSObject |
13 | 13 |
14 // Should find in page be displayed. | 14 // Should find in page be displayed. |
15 @property(nonatomic, assign) BOOL enabled; | 15 @property(nonatomic, assign) BOOL enabled; |
16 | 16 |
17 // The current search string. | 17 // The current search string. |
18 @property(nonatomic, readonly) NSString* text; | 18 @property(weak, nonatomic, readonly) NSString* text; |
noyau (Ping after 24h)
2016/11/25 10:27:46
Weak? The implementation is doing copy... For a re
stkhapugin
2016/11/25 11:23:03
Done.
| |
19 | 19 |
20 // The number of matches for |text|. | 20 // The number of matches for |text|. |
21 @property(nonatomic, readonly) NSUInteger matches; | 21 @property(nonatomic, readonly) NSUInteger matches; |
22 | 22 |
23 // The currently higlighted index. | 23 // The currently higlighted index. |
24 @property(nonatomic, readonly) NSUInteger currentIndex; | 24 @property(nonatomic, readonly) NSUInteger currentIndex; |
25 | 25 |
26 // The content offset needed to display the |currentIndex| match. | 26 // The content offset needed to display the |currentIndex| match. |
27 @property(nonatomic, readonly) CGPoint currentPoint; | 27 @property(nonatomic, readonly) CGPoint currentPoint; |
28 | 28 |
29 // Update the query string and the number of matches. | 29 // Update the query string and the number of matches. |
30 - (void)updateQuery:(NSString*)query matches:(NSUInteger)matches; | 30 - (void)updateQuery:(NSString*)query matches:(NSUInteger)matches; |
31 // Update the current match index and its found position. | 31 // Update the current match index and its found position. |
32 - (void)updateIndex:(NSInteger)index atPoint:(CGPoint)point; | 32 - (void)updateIndex:(NSInteger)index atPoint:(CGPoint)point; |
33 | 33 |
34 @end | 34 @end |
35 | 35 |
36 #endif // IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_ | 36 #endif // IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_ |
OLD | NEW |