Rename GetIconID to GetIconId
[chromium-blink-merge.git] / chrome / browser / android / bookmarks / partner_bookmarks_reader.h
blob66fbe7ba5be8e22632d8e74f91bff8a5a4e37988
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.
5 #ifndef CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_READER_H_
6 #define CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_READER_H_
8 #include "base/android/jni_weak_ref.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/bookmarks/browser/bookmark_model.h"
12 class PartnerBookmarksShim;
13 class Profile;
15 // Generates a partner bookmark hierarchy and handles submitting the results to
16 // the global PartnerBookmarksShim.
17 class PartnerBookmarksReader {
18 public:
19 PartnerBookmarksReader(PartnerBookmarksShim* partner_bookmarks_shim,
20 Profile* profile);
21 ~PartnerBookmarksReader();
23 // JNI methods
24 void Destroy(JNIEnv* env, jobject obj);
25 void Reset(JNIEnv* env, jobject obj);
26 jlong AddPartnerBookmark(JNIEnv* env,
27 jobject obj,
28 jstring jurl,
29 jstring jtitle,
30 jboolean is_folder,
31 jlong parent_id,
32 jbyteArray favicon,
33 jbyteArray touchicon);
34 void PartnerBookmarksCreationComplete(JNIEnv* env, jobject obj);
36 // JNI registration
37 static bool RegisterPartnerBookmarksReader(JNIEnv* env);
39 private:
40 PartnerBookmarksShim* partner_bookmarks_shim_;
41 Profile* profile_;
43 // JNI
44 scoped_ptr<bookmarks::BookmarkNode> wip_partner_bookmarks_root_;
45 int64 wip_next_available_id_;
47 DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksReader);
50 #endif // CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_READER_H_