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

Side by Side Diff: ios/chrome/app/spotlight/base_spotlight_manager.h

Issue 2580363002: Upstream Chrome on iOS source code [1/11]. (Closed)
Patch Set: Created 3 years, 12 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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.
4
5 #ifndef IOS_CHROME_APP_SPOTLIGHT_BASE_SPOTLIGHT_MANAGER_H_
6 #define IOS_CHROME_APP_SPOTLIGHT_BASE_SPOTLIGHT_MANAGER_H_
7
8 #import <CoreSpotlight/CoreSpotlight.h>
9 #import <UIKit/UIKit.h>
10
11 #include "base/mac/scoped_nsobject.h"
12 #include "ios/chrome/app/spotlight/spotlight_util.h"
13
14 class GURL;
15
16 namespace favicon {
17 class LargeIconService;
18 }
19
20 @interface BaseSpotlightManager : NSObject
21
22 - (instancetype)initWithLargeIconService:
23 (favicon::LargeIconService*)largeIconService
24 domain:(spotlight::Domain)domain
25 NS_DESIGNATED_INITIALIZER;
26
27 - (instancetype)init NS_UNAVAILABLE;
28
29 // Refreshes all items that point to |URLToRefresh|, using title |title|, by
30 // calling spotlightItemsWithURL on given URL. The values of |title| and |URL|
31 // will be passed to spotlightItemsWithURL.
32 - (void)refreshItemsWithURL:(const GURL&)URLToRefresh title:(NSString*)title;
33
34 // Creates a spotlight item with |itemID|, using the |attributeSet|.
35 - (CSSearchableItem*)spotlightItemWithItemID:(NSString*)itemID
36 attributeSet:
37 (CSSearchableItemAttributeSet*)attributeSet;
38
39 // Creates spotlight items in the class's domain for |URL|,
40 // using |favicon| and |defaultTitle|
41 // Base implementation creates a single item directly using provided arguments
42 // and expects a non-nil title.
43 - (NSArray*)spotlightItemsWithURL:(const GURL&)URL
44 favicon:(UIImage*)favicon
45 defaultTitle:(NSString*)defaultTitle;
46
47 // Removes all items in the current manager's domain from the Spotlight
48 // index, then calls |callback| on completion
49 - (void)clearAllSpotlightItems:(BlockWithError)callback;
50
51 // Cancel all large icon pending tasks.
52 - (void)cancelAllLargeIconPendingTasks;
53
54 // Returns the spotlight ID for an item indexing |URL| and |title|.
55 - (NSString*)spotlightIDForURL:(const GURL&)URL title:(NSString*)title;
56
57 // Returns the number of pending large icon query tasks
58 - (NSUInteger)pendingLargeIconTasksCount;
59
60 @end
61
62 #endif // IOS_CHROME_APP_SPOTLIGHT_BASE_SPOTLIGHT_MANAGER_H_
OLDNEW
« no previous file with comments | « ios/chrome/app/spotlight/actions_spotlight_manager.mm ('k') | ios/chrome/app/spotlight/base_spotlight_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698