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

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

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.mm
diff --git a/ios/chrome/browser/find_in_page/find_in_page_model.mm b/ios/chrome/browser/find_in_page/find_in_page_model.mm
new file mode 100644
index 0000000000000000000000000000000000000000..ea107ebb5f884fce175fb6093b539232f8e77596
--- /dev/null
+++ b/ios/chrome/browser/find_in_page/find_in_page_model.mm
@@ -0,0 +1,37 @@
+// Copyright 2012 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.
+
+#import "ios/chrome/browser/find_in_page/find_in_page_model.h"
+
+@implementation FindInPageModel
+
+@synthesize enabled = enabled_;
+@synthesize matches = matches_;
+@synthesize currentIndex = currentIndex_;
+@synthesize currentPoint = currentPoint_;
+
+- (NSString*)text {
+ return text_;
+}
+
+- (void)setEnabled:(BOOL)enabled {
+ enabled_ = enabled;
+ matches_ = 0;
+ currentIndex_ = 0;
+ currentPoint_ = CGPointZero;
+}
+
+- (void)updateQuery:(NSString*)query matches:(NSUInteger)matches {
+ if (query)
+ text_.reset([query copy]);
+ matches_ = matches;
+ currentIndex_ = 0;
+}
+
+- (void)updateIndex:(NSInteger)index atPoint:(CGPoint)point {
+ currentIndex_ = index;
+ currentPoint_ = point;
+}
+
+@end
« no previous file with comments | « ios/chrome/browser/find_in_page/find_in_page_model.h ('k') | ios/chrome/browser/find_in_page/js_findinpage_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698