| 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" |
| 11 #include "base/android/jni_weak_ref.h" | 11 #include "base/android/jni_weak_ref.h" |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" | 14 #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" |
| 15 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | |
| 16 #include "components/bookmarks/browser/base_bookmark_model_observer.h" | 15 #include "components/bookmarks/browser/base_bookmark_model_observer.h" |
| 17 #include "components/bookmarks/common/android/bookmark_id.h" | 16 #include "components/bookmarks/common/android/bookmark_id.h" |
| 18 | 17 |
| 19 namespace bookmarks { | 18 namespace bookmarks { |
| 19 class BookmarkModel; |
| 20 class ManagedBookmarkService; |
| 20 class ScopedGroupBookmarkActions; | 21 class ScopedGroupBookmarkActions; |
| 21 } | 22 } |
| 22 | 23 |
| 23 class Profile; | 24 class Profile; |
| 24 | 25 |
| 25 // The delegate to fetch bookmarks information for the Android native | 26 // The delegate to fetch bookmarks information for the Android native |
| 26 // bookmark page. This fetches the bookmarks, title, urls, folder | 27 // bookmark page. This fetches the bookmarks, title, urls, folder |
| 27 // hierarchy. | 28 // hierarchy. |
| 28 class BookmarksBridge : public bookmarks::BaseBookmarkModelObserver, | 29 class BookmarksBridge : public bookmarks::BaseBookmarkModelObserver, |
| 29 public PartnerBookmarksShim::Observer { | 30 public PartnerBookmarksShim::Observer { |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 void ExtensiveBookmarkChangesEnded(bookmarks::BookmarkModel* model) override; | 208 void ExtensiveBookmarkChangesEnded(bookmarks::BookmarkModel* model) override; |
| 208 | 209 |
| 209 // Override PartnerBookmarksShim::Observer | 210 // Override PartnerBookmarksShim::Observer |
| 210 void PartnerShimChanged(PartnerBookmarksShim* shim) override; | 211 void PartnerShimChanged(PartnerBookmarksShim* shim) override; |
| 211 void PartnerShimLoaded(PartnerBookmarksShim* shim) override; | 212 void PartnerShimLoaded(PartnerBookmarksShim* shim) override; |
| 212 void ShimBeingDeleted(PartnerBookmarksShim* shim) override; | 213 void ShimBeingDeleted(PartnerBookmarksShim* shim) override; |
| 213 | 214 |
| 214 Profile* profile_; | 215 Profile* profile_; |
| 215 JavaObjectWeakGlobalRef weak_java_ref_; | 216 JavaObjectWeakGlobalRef weak_java_ref_; |
| 216 bookmarks::BookmarkModel* bookmark_model_; // weak | 217 bookmarks::BookmarkModel* bookmark_model_; // weak |
| 217 ChromeBookmarkClient* client_; // weak | 218 bookmarks::ManagedBookmarkService* managed_bookmark_service_; // weak |
| 218 scoped_ptr<bookmarks::ScopedGroupBookmarkActions> grouped_bookmark_actions_; | 219 scoped_ptr<bookmarks::ScopedGroupBookmarkActions> grouped_bookmark_actions_; |
| 219 | 220 |
| 220 // Information about the Partner bookmarks (must check for IsLoaded()). | 221 // Information about the Partner bookmarks (must check for IsLoaded()). |
| 221 // This is owned by profile. | 222 // This is owned by profile. |
| 222 PartnerBookmarksShim* partner_bookmarks_shim_; | 223 PartnerBookmarksShim* partner_bookmarks_shim_; |
| 223 | 224 |
| 224 DISALLOW_COPY_AND_ASSIGN(BookmarksBridge); | 225 DISALLOW_COPY_AND_ASSIGN(BookmarksBridge); |
| 225 }; | 226 }; |
| 226 | 227 |
| 227 #endif // CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARKS_BRIDGE_H_ | 228 #endif // CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARKS_BRIDGE_H_ |
| OLD | NEW |