Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: ios/chrome/browser/find_in_page/find_in_page_model.h

Issue 1023813003: [iOS] Upstream ios/chrome/browser/find_in_page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@upstreamAutofill
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/find_in_page/find_in_page_model.h
diff --git a/ios/chrome/browser/find_in_page/find_in_page_model.h b/ios/chrome/browser/find_in_page/find_in_page_model.h
new file mode 100644
index 0000000000000000000000000000000000000000..3199b64c1c377842890ab304d85536f9318b42bb
--- /dev/null
+++ b/ios/chrome/browser/find_in_page/find_in_page_model.h
@@ -0,0 +1,39 @@
+// Copyright 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_
+#define IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_
+
+#import <UIKit/UIKit.h>
+#include "base/mac/scoped_nsobject.h"
+
+// This is a simplified version of find_tab_helper.cc.
+@interface FindInPageModel : NSObject {
+ @private
+ // Should find in page be displayed.
+ BOOL enabled_;
+ // The current search string.
+ base::scoped_nsobject<NSString> text_;
+ // The number of matches for |text_|
+ NSUInteger matches_;
+ // The currently higlighted index.
+ NSUInteger currentIndex_;
+ // The content offset needed to display the |currentIndex_| match.
+ CGPoint currentPoint_;
+}
+
+@property(nonatomic, readwrite, assign) BOOL enabled;
+@property(nonatomic, readonly) NSString* text;
+@property(nonatomic, readonly) NSUInteger matches;
+@property(nonatomic, readonly) NSUInteger currentIndex;
+@property(nonatomic, readonly) CGPoint currentPoint;
+
+// Update the query string and the number of matches.
+- (void)updateQuery:(NSString*)query matches:(NSUInteger)matches;
+// Update the current match index and its found position.
+- (void)updateIndex:(NSInteger)index atPoint:(CGPoint)point;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_FIND_IN_PAGE_FIND_IN_PAGE_MODEL_H_
« no previous file with comments | « ios/chrome/browser/find_in_page/find_in_page_controller.mm ('k') | ios/chrome/browser/find_in_page/find_in_page_model.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698