| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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.bookmarks; | 5 package org.chromium.chrome.browser.bookmarks; |
| 6 | 6 |
| 7 import android.view.LayoutInflater; | 7 import android.view.LayoutInflater; |
| 8 import android.view.View; | 8 import android.view.View; |
| 9 import android.view.ViewGroup; | 9 import android.view.ViewGroup; |
| 10 import android.widget.BaseAdapter; | 10 import android.widget.BaseAdapter; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 static final int VIEW_TYPE_ITEM = 0; | 29 static final int VIEW_TYPE_ITEM = 0; |
| 30 static final int VIEW_TYPE_DIVIDER = 1; | 30 static final int VIEW_TYPE_DIVIDER = 1; |
| 31 static final int VIEW_TYPE_TITLE = 2; | 31 static final int VIEW_TYPE_TITLE = 2; |
| 32 | 32 |
| 33 private BookmarkDelegate mDelegate; | 33 private BookmarkDelegate mDelegate; |
| 34 private List<Item> mTopSection = new ArrayList<Item>(); | 34 private List<Item> mTopSection = new ArrayList<Item>(); |
| 35 private List<Item> mBottomSection = new ArrayList<Item>(); | 35 private List<Item> mBottomSection = new ArrayList<Item>(); |
| 36 // array containing the order of sections | 36 // array containing the order of sections |
| 37 private List<?>[] mSections = {mTopSection, mBottomSection}; | 37 private List<?>[] mSections = {mTopSection, mBottomSection}; |
| 38 | 38 |
| 39 private BookmarkId mDesktopNodeId = null; | 39 private BookmarkId mDesktopNodeId; |
| 40 private BookmarkId mMobileNodeId = null; | 40 private BookmarkId mMobileNodeId; |
| 41 private BookmarkId mOthersNodeId = null; | 41 private BookmarkId mOthersNodeId; |
| 42 private List<BookmarkId> mManagedAndPartnerFolderIds = null; | 42 private List<BookmarkId> mManagedAndPartnerFolderIds; |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * Represents each item in the list. | 45 * Represents each item in the list. |
| 46 */ | 46 */ |
| 47 static class Item { | 47 static class Item { |
| 48 final int mType; | 48 final int mType; |
| 49 final BookmarkId mFolderId; | 49 final BookmarkId mFolderId; |
| 50 | 50 |
| 51 Item(int itemType) { | 51 Item(int itemType) { |
| 52 mType = itemType; | 52 mType = itemType; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 iconDrawableId = 0; | 313 iconDrawableId = 0; |
| 314 assert false; | 314 assert false; |
| 315 } | 315 } |
| 316 | 316 |
| 317 listItemView.setText(title); | 317 listItemView.setText(title); |
| 318 listItemView.setIcon(iconDrawableId); | 318 listItemView.setIcon(iconDrawableId); |
| 319 | 319 |
| 320 return convertView; | 320 return convertView; |
| 321 } | 321 } |
| 322 } | 322 } |
| OLD | NEW |