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 package org.chromium.chrome.browser; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.util.Pair; | 7 import android.util.Pair; |
8 | 8 |
9 import org.chromium.base.CalledByNative; | 9 import org.chromium.base.CalledByNative; |
10 import org.chromium.base.ObserverList; | 10 import org.chromium.base.ObserverList; |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 } | 537 } |
538 | 538 |
539 /** | 539 /** |
540 * End grouping actions for a single undo operation | 540 * End grouping actions for a single undo operation |
541 * Note: This only works with BookmarkModel, not partner bookmarks. | 541 * Note: This only works with BookmarkModel, not partner bookmarks. |
542 */ | 542 */ |
543 public void endGroupingUndos() { | 543 public void endGroupingUndos() { |
544 nativeEndGroupingUndos(mNativeBookmarksBridge); | 544 nativeEndGroupingUndos(mNativeBookmarksBridge); |
545 } | 545 } |
546 | 546 |
| 547 public static boolean isEditBookmarksEnabled(Profile profile) { |
| 548 return nativeIsEditBookmarksEnabled(profile); |
| 549 } |
| 550 |
| 551 // TODO(ianwen): Remove this method after rolling. |
547 public static boolean isEditBookmarksEnabled() { | 552 public static boolean isEditBookmarksEnabled() { |
548 return nativeIsEditBookmarksEnabled(); | 553 return true; |
549 } | 554 } |
550 | 555 |
551 public static boolean isEnhancedBookmarksEnabled(Profile profile) { | 556 public static boolean isEnhancedBookmarksEnabled(Profile profile) { |
552 return nativeIsEnhancedBookmarksFeatureEnabled(profile); | 557 return nativeIsEnhancedBookmarksFeatureEnabled(profile); |
553 } | 558 } |
554 | 559 |
555 @CalledByNative | 560 @CalledByNative |
556 private void bookmarkModelLoaded() { | 561 private void bookmarkModelLoaded() { |
557 mIsNativeBookmarkModelLoaded = true; | 562 mIsNativeBookmarkModelLoaded = true; |
558 | 563 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 int index, String title, String url); | 735 int index, String title, String url); |
731 private native void nativeUndo(long nativeBookmarksBridge); | 736 private native void nativeUndo(long nativeBookmarksBridge); |
732 private native void nativeStartGroupingUndos(long nativeBookmarksBridge); | 737 private native void nativeStartGroupingUndos(long nativeBookmarksBridge); |
733 private native void nativeEndGroupingUndos(long nativeBookmarksBridge); | 738 private native void nativeEndGroupingUndos(long nativeBookmarksBridge); |
734 private static native boolean nativeIsEnhancedBookmarksFeatureEnabled(Profil
e profile); | 739 private static native boolean nativeIsEnhancedBookmarksFeatureEnabled(Profil
e profile); |
735 private native void nativeLoadEmptyPartnerBookmarkShimForTesting(long native
BookmarksBridge); | 740 private native void nativeLoadEmptyPartnerBookmarkShimForTesting(long native
BookmarksBridge); |
736 | 741 |
737 private native long nativeInit(Profile profile); | 742 private native long nativeInit(Profile profile); |
738 private native boolean nativeIsDoingExtensiveChanges(long nativeBookmarksBri
dge); | 743 private native boolean nativeIsDoingExtensiveChanges(long nativeBookmarksBri
dge); |
739 private native void nativeDestroy(long nativeBookmarksBridge); | 744 private native void nativeDestroy(long nativeBookmarksBridge); |
740 private static native boolean nativeIsEditBookmarksEnabled(); | 745 private static native boolean nativeIsEditBookmarksEnabled(Profile profile); |
741 | 746 |
742 /** | 747 /** |
743 * Simple object representing the bookmark item. | 748 * Simple object representing the bookmark item. |
744 */ | 749 */ |
745 public static class BookmarkItem { | 750 public static class BookmarkItem { |
746 | 751 |
747 private final String mTitle; | 752 private final String mTitle; |
748 private final String mUrl; | 753 private final String mUrl; |
749 private final BookmarkId mId; | 754 private final BookmarkId mId; |
750 private final boolean mIsFolder; | 755 private final boolean mIsFolder; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 case GET_CURRENT_FOLDER_HIERARCHY: | 836 case GET_CURRENT_FOLDER_HIERARCHY: |
832 mHandler.getCurrentFolderHierarchy(mFolderId, mCallback); | 837 mHandler.getCurrentFolderHierarchy(mFolderId, mCallback); |
833 break; | 838 break; |
834 default: | 839 default: |
835 assert false; | 840 assert false; |
836 break; | 841 break; |
837 } | 842 } |
838 } | 843 } |
839 } | 844 } |
840 } | 845 } |
OLD | NEW |