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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItemView.java

Issue 2673003003: Rename MostVisited ui bits to Tile(Grid). (Closed)
Patch Set: Rebase. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItemView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItemView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItemView.java
deleted file mode 100644
index cffb2e64f7a4ea2f209747d9cfd19d792da870c7..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItemView.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.ntp;
-
-import android.content.Context;
-import android.graphics.drawable.Drawable;
-import android.support.annotation.Nullable;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import org.chromium.chrome.R;
-
-/**
- * The view for a most visited item. Displays the title of the page beneath a large icon. If a large
- * icon isn't available, displays a rounded rectangle with a single letter in its place.
- */
-public class MostVisitedItemView extends FrameLayout {
- private String mUrl;
-
- /**
- * Constructor for inflating from XML.
- */
- public MostVisitedItemView(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- /**
- * Sets the title text.
- */
- public void setTitle(String title) {
- ((TextView) findViewById(R.id.most_visited_title)).setText(title);
- }
-
- /**
- * Sets the icon, or null to clear it.
- */
- public void setIcon(@Nullable Drawable icon) {
- ((ImageView) findViewById(R.id.most_visited_icon)).setImageDrawable(icon);
- }
-
- /**
- * Sets whether the page is available offline.
- */
- public void setOfflineAvailable(boolean offlineAvailable) {
- findViewById(R.id.offline_badge).setVisibility(
- offlineAvailable ? View.VISIBLE : View.INVISIBLE);
- }
-
- /**
- * Sets the site URL. This is used to identify the view.
- */
- public void setUrl(String url) {
- mUrl = url;
- }
-
- /**
- * Gets the site URL. This is used to identify the view.
- */
- public String getUrl() {
- return mUrl;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698