1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import "ios/chrome/browser/find_in_page/find_in_page_model.h"
7 #include "base/mac/scoped_nsobject.h"
9 @implementation FindInPageModel {
10 base::scoped_nsobject<NSString> _text;
13 @synthesize enabled = _enabled;
14 @synthesize matches = _matches;
15 @synthesize currentIndex = _currentIndex;
16 @synthesize currentPoint = _currentPoint;
22 - (void)setEnabled:(BOOL)enabled {
26 _currentPoint = CGPointZero;
29 - (void)updateQuery:(NSString*)query matches:(NSUInteger)matches {
31 _text.reset([query copy]);
36 - (void)updateIndex:(NSInteger)index atPoint:(CGPoint)point {
37 _currentIndex = index;
38 _currentPoint = point;