Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / ios / chrome / browser / find_in_page / find_in_page_model.mm
blob8cc3ec44b081a6739852e742d083584144a602e3
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;
18 - (NSString*)text {
19   return _text;
22 - (void)setEnabled:(BOOL)enabled {
23   _enabled = enabled;
24   _matches = 0;
25   _currentIndex = 0;
26   _currentPoint = CGPointZero;
29 - (void)updateQuery:(NSString*)query matches:(NSUInteger)matches {
30   if (query)
31     _text.reset([query copy]);
32   _matches = matches;
33   _currentIndex = 0;
36 - (void)updateIndex:(NSInteger)index atPoint:(CGPoint)point {
37   _currentIndex = index;
38   _currentPoint = point;
41 @end