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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkFolderRow.java

Issue 1253783002: Refactor the way enhanced bookmark gets large icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use mDelegate.getModel Created 5 years, 5 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 unified diff | Download patch
OLDNEW
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.enhancedbookmarks; 5 package org.chromium.chrome.browser.enhancedbookmarks;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.util.AttributeSet; 8 import android.util.AttributeSet;
9 9
10 import org.chromium.chrome.R; 10 import org.chromium.chrome.R;
11 import org.chromium.chrome.browser.BookmarksBridge.BookmarkItem;
11 import org.chromium.chrome.browser.widget.TintedDrawable; 12 import org.chromium.chrome.browser.widget.TintedDrawable;
12 import org.chromium.components.bookmarks.BookmarkId; 13 import org.chromium.components.bookmarks.BookmarkId;
13 14
14 /** 15 /**
15 * A row view that shows folder info in the enhanced bookmarks UI. 16 * A row view that shows folder info in the enhanced bookmarks UI.
16 */ 17 */
17 public class EnhancedBookmarkFolderRow extends EnhancedBookmarkRow { 18 public class EnhancedBookmarkFolderRow extends EnhancedBookmarkRow {
18 19
19 /** 20 /**
20 * Constructor for inflating from XML. 21 * Constructor for inflating from XML.
(...skipping 10 matching lines...) Expand all
31 } 32 }
32 33
33 // EnhancedBookmarkRow implementation. 34 // EnhancedBookmarkRow implementation.
34 35
35 @Override 36 @Override
36 public void onClick() { 37 public void onClick() {
37 mDelegate.openFolder(mBookmarkId); 38 mDelegate.openFolder(mBookmarkId);
38 } 39 }
39 40
40 @Override 41 @Override
41 public void setBookmarkId(BookmarkId bookmarkId) { 42 BookmarkItem setBookmarkId(BookmarkId bookmarkId) {
42 super.setBookmarkId(bookmarkId); 43 BookmarkItem item = super.setBookmarkId(bookmarkId);
43 mTitleView.setText(mDelegate.getModel().getBookmarkTitle(bookmarkId)); 44 mTitleView.setText(item.getTitle());
45 return item;
44 } 46 }
45 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698