| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARKS_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARKS_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARKS_BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARKS_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 virtual ~BookmarksBridge(); | 47 virtual ~BookmarksBridge(); |
| 48 | 48 |
| 49 base::android::ScopedJavaLocalRef<jobject> CreateJavaBookmark( | 49 base::android::ScopedJavaLocalRef<jobject> CreateJavaBookmark( |
| 50 const BookmarkNode* node); | 50 const BookmarkNode* node); |
| 51 void ExtractBookmarkNodeInformation( | 51 void ExtractBookmarkNodeInformation( |
| 52 const BookmarkNode* node, | 52 const BookmarkNode* node, |
| 53 jobject j_result_obj); | 53 jobject j_result_obj); |
| 54 const BookmarkNode* GetNodeByID(long node_id, int type); | 54 const BookmarkNode* GetNodeByID(long node_id, int type); |
| 55 const BookmarkNode* GetNodeByID(jobject j_node_obj); |
| 55 const BookmarkNode* GetFolderWithFallback(long folder_id, int type); | 56 const BookmarkNode* GetFolderWithFallback(long folder_id, int type); |
| 57 const BookmarkNode* GetFolderWithFallback(jobject j_folder_obj); |
| 56 // Returns true if |node| can be modified by the user. | 58 // Returns true if |node| can be modified by the user. |
| 57 bool IsEditable(const BookmarkNode* node) const; | 59 bool IsEditable(const BookmarkNode* node) const; |
| 58 const BookmarkNode* GetParentNode(const BookmarkNode* node); | 60 const BookmarkNode* GetParentNode(const BookmarkNode* node); |
| 59 int GetBookmarkType(const BookmarkNode* node); | 61 int GetBookmarkType(const BookmarkNode* node); |
| 60 | 62 |
| 61 // Override BaseBookmarkModelObserver. | 63 // Override BaseBookmarkModelObserver. |
| 62 // Called when there are changes to the bookmark model that don't trigger | 64 // Called when there are changes to the bookmark model that don't trigger |
| 63 // any of the other callback methods. For example, this is called when | 65 // any of the other callback methods. For example, this is called when |
| 64 // managed or partner bookmarks change. | 66 // managed or partner bookmarks change. |
| 65 virtual void BookmarkModelChanged() OVERRIDE; | 67 virtual void BookmarkModelChanged() OVERRIDE; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 89 | 91 |
| 90 JavaObjectWeakGlobalRef weak_java_ref_; | 92 JavaObjectWeakGlobalRef weak_java_ref_; |
| 91 BookmarkModel* bookmark_model_; // weak | 93 BookmarkModel* bookmark_model_; // weak |
| 92 | 94 |
| 93 scoped_ptr<ManagedBookmarksShim> managed_bookmarks_shim_; | 95 scoped_ptr<ManagedBookmarksShim> managed_bookmarks_shim_; |
| 94 | 96 |
| 95 DISALLOW_COPY_AND_ASSIGN(BookmarksBridge); | 97 DISALLOW_COPY_AND_ASSIGN(BookmarksBridge); |
| 96 }; | 98 }; |
| 97 | 99 |
| 98 #endif // CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARKS_BRIDGE_H_ | 100 #endif // CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARKS_BRIDGE_H_ |
| OLD | NEW |