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
;
15 // Generates a partner bookmark hierarchy and handles submitting the results to
16 // the global PartnerBookmarksShim.
17 class PartnerBookmarksReader
{
19 PartnerBookmarksReader(PartnerBookmarksShim
* partner_bookmarks_shim
,
21 ~PartnerBookmarksReader();
24 void Destroy(JNIEnv
* env
, jobject obj
);
25 void Reset(JNIEnv
* env
, jobject obj
);
26 jlong
AddPartnerBookmark(JNIEnv
* env
,
33 jbyteArray touchicon
);
34 void PartnerBookmarksCreationComplete(JNIEnv
* env
, jobject obj
);
37 static bool RegisterPartnerBookmarksReader(JNIEnv
* env
);
40 PartnerBookmarksShim
* partner_bookmarks_shim_
;
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_