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

Unified Diff: components/enhanced_bookmarks/android/java/src/org/chromium/components/enhancedbookmarks/EnhancedBookmarksBridge.java

Issue 459973004: [Android] EnhancedBookmarksBridge for bookmark description read&write. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: java DEPS fix Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/enhanced_bookmarks/android/enhanced_bookmarks_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/enhanced_bookmarks/android/java/src/org/chromium/components/enhancedbookmarks/EnhancedBookmarksBridge.java
diff --git a/components/enhanced_bookmarks/android/java/src/org/chromium/components/enhancedbookmarks/EnhancedBookmarksBridge.java b/components/enhanced_bookmarks/android/java/src/org/chromium/components/enhancedbookmarks/EnhancedBookmarksBridge.java
new file mode 100644
index 0000000000000000000000000000000000000000..c244cb5f4c8d97a1cb33e6b9981b4aef1d7d0fef
--- /dev/null
+++ b/components/enhanced_bookmarks/android/java/src/org/chromium/components/enhancedbookmarks/EnhancedBookmarksBridge.java
@@ -0,0 +1,45 @@
+// Copyright 2014 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.
+
+package org.chromium.components.enhancedbookmarks;
+
+import org.chromium.base.JNINamespace;
+import org.chromium.components.bookmarks.BookmarkId;
+
+/**
+ * Access gate to C++ side enhanced bookmarks functionalities.
+ */
+@JNINamespace("enhanced_bookmarks::android")
+public final class EnhancedBookmarksBridge {
+ private long mNativeEnhancedBookmarksBridge;
+
+ public EnhancedBookmarksBridge(long nativeBookmarkModel) {
+ mNativeEnhancedBookmarksBridge = nativeInit(nativeBookmarkModel);
+ }
+
+ public void destroy() {
+ assert mNativeEnhancedBookmarksBridge != 0;
+ nativeDestroy(mNativeEnhancedBookmarksBridge);
+ mNativeEnhancedBookmarksBridge = 0;
+ }
+
+ public String getBookmarkDescription(BookmarkId id) {
+ return nativeGetBookmarkDescription(mNativeEnhancedBookmarksBridge, id.getId(),
+ id.getType());
+ }
+
+ public void setBookmarkDescription(BookmarkId id, String description) {
+ nativeSetBookmarkDescription(mNativeEnhancedBookmarksBridge, id.getId(), id.getType(),
+ description);
+ }
+
+ private native long nativeInit(long bookmarkModelPointer);
+
+ private native void nativeDestroy(long nativeEnhancedBookmarksBridge);
+
+ private native String nativeGetBookmarkDescription(long nativeEnhancedBookmarksBridge, long id,
+ int type);
+ private native void nativeSetBookmarkDescription(long nativeEnhancedBookmarksBridge, long id,
+ int type, String description);
+}
« no previous file with comments | « components/enhanced_bookmarks/android/enhanced_bookmarks_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698