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

Side by Side Diff: ios/chrome/browser/ui/bookmarks/bookmark_position_cache.h

Issue 2586993002: Upstream Chrome on iOS source code [3/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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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_BROWSER_UI_BOOKMARKS_BOOKMARK_POSITION_CACHE_H_
6 #define IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_POSITION_CACHE_H_
7
8 #import <Foundation/Foundation.h>
9
10 #include <stdint.h>
11
12 #include "base/macros.h"
13 #import "ios/chrome/browser/ui/bookmarks/bookmark_menu_item.h"
14
15 // Caches the user's position in the bookmark hierarchy navigator, as well as
16 // enough information to recreate the primary menu item.
17 @interface BookmarkPositionCache : NSObject<NSCoding>
18
19 @property(nonatomic, assign, readonly) int64_t folderId;
20 @property(nonatomic, assign, readonly) CGFloat position;
21 @property(nonatomic, assign, readonly) bookmarks::MenuItemType type;
22
23 + (BookmarkPositionCache*)cacheForMenuItemAllWithPosition:(CGFloat)position;
24 + (BookmarkPositionCache*)cacheForMenuItemFolderWithPosition:(CGFloat)position
25 folderId:(int64_t)folderId;
26
27 // This is not the designated initializer. It will return nil if there are
28 // problems with the decoding process.
29 - (instancetype)initWithCoder:(NSCoder*)coder;
30 @end
31
32 @interface BookmarkPositionCache (ExposedForTesting)
33 - (instancetype)initWithFolderId:(int64_t)folderId
34 position:(CGFloat)position
35 type:(bookmarks::MenuItemType)type;
36 @end
37
38 #endif // IOS_CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_POSITION_CACHE_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/bookmarks/bookmark_panel_view.mm ('k') | ios/chrome/browser/ui/bookmarks/bookmark_position_cache.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698