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

Unified Diff: ios/chrome/app/spotlight/bookmarks_spotlight_manager.h

Issue 2580363002: Upstream Chrome on iOS source code [1/11]. (Closed)
Patch Set: Created 4 years 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/app/spotlight/bookmarks_spotlight_manager.h
diff --git a/ios/chrome/app/spotlight/bookmarks_spotlight_manager.h b/ios/chrome/app/spotlight/bookmarks_spotlight_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..31534ed3d9fc5966e8e5ff1743c49513fecc461f
--- /dev/null
+++ b/ios/chrome/app/spotlight/bookmarks_spotlight_manager.h
@@ -0,0 +1,57 @@
+// Copyright 2015 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_APP_SPOTLIGHT_BOOKMARKS_SPOTLIGHT_MANAGER_H_
+#define IOS_CHROME_APP_SPOTLIGHT_BOOKMARKS_SPOTLIGHT_MANAGER_H_
+
+#import "ios/chrome/app/spotlight/base_spotlight_manager.h"
+
+namespace bookmarks {
+class BookmarkNode;
+class BookmarkModel;
+}
+
+namespace ios {
+class ChromeBrowserState;
+} // namespace ios
+
+@class CSSearchableItem;
+@class TopSitesSpotlightManager;
+
+@protocol BookmarkUpdatedDelegate
+
+// Called when a bookmark is updated.
+- (void)bookmarkUpdated;
+
+@end
+
+@interface BookmarksSpotlightManager : BaseSpotlightManager
+
+// The delegate notified when a bookmark is updated.
+@property(nonatomic, assign) id<BookmarkUpdatedDelegate> delegate;
+
++ (BookmarksSpotlightManager*)bookmarksSpotlightManagerWithBrowserState:
+ (ios::ChromeBrowserState*)browserState;
+
+// Checks the date of the latest global indexation and reindex all bookmarks if
+// needed.
+- (void)reindexBookmarksIfNeeded;
+
+// Methods below here are for testing use only.
+
+- (instancetype)
+initWithLargeIconService:(favicon::LargeIconService*)largeIconService
+ bookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel;
+
+// Recursively adds node ancestors titles to keywords. Permanent nodes are
+// ignored.
+- (void)getParentKeywordsForNode:(const bookmarks::BookmarkNode*)node
+ inArray:(NSMutableArray*)keywords;
+
+// Adds keywords to |item|.
+- (void)addKeywords:(NSArray*)keywords toSearchableItem:(CSSearchableItem*)item;
+
+@end
+
+#endif // IOS_CHROME_APP_SPOTLIGHT_BOOKMARKS_SPOTLIGHT_MANAGER_H_
« no previous file with comments | « ios/chrome/app/spotlight/base_spotlight_manager.mm ('k') | ios/chrome/app/spotlight/bookmarks_spotlight_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698