Commit b2b66a52 authored by Yaron Friedman's avatar Yaron Friedman Committed by Commit Bot

Remove some unused code.

Found while tracking references to |onFinishGetGitmap|
Seems like Pedro found some dead code earlier but missed this part
BUG=651348

Change-Id: Ic93464abc91ae98dbf8eb9a92a641d162838b90e
Reviewed-on: https://chromium-review.googlesource.com/921862
Commit-Queue: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537898}
parent d3e82cc4
......@@ -7,7 +7,6 @@ package org.chromium.chrome.browser.compositor.layouts.content;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.util.SparseArray;
import android.view.View;
import org.chromium.base.CommandLine;
......@@ -35,21 +34,8 @@ public class TabContentManager {
private int[] mPriorityTabIds;
private long mNativeTabContentManager;
/**
* A callback interface for decompressing the thumbnail for a tab into a bitmap.
*/
public static interface DecompressThumbnailCallback {
/**
* Called when the decompression finishes.
* @param bitmap The {@link Bitmap} of the content. Null will be passed for failure.
*/
public void onFinishGetBitmap(Bitmap bitmap);
}
private final ArrayList<ThumbnailChangeListener> mListeners =
new ArrayList<ThumbnailChangeListener>();
private final SparseArray<DecompressThumbnailCallback> mDecompressRequests =
new SparseArray<TabContentManager.DecompressThumbnailCallback>();
private boolean mSnapshotsEnabled;
......@@ -235,14 +221,6 @@ public class TabContentManager {
}
}
@CalledByNative
private void notifyDecompressBitmapFinished(int tabId, Bitmap bitmap) {
DecompressThumbnailCallback callback = mDecompressRequests.get(tabId);
mDecompressRequests.remove(tabId);
if (callback == null) return;
callback.onFinishGetBitmap(bitmap);
}
/**
* Invalidate a thumbnail if the content of the tab has been changed.
* @param tabId The id of the {@link Tab} thumbnail to check.
......
......@@ -191,18 +191,6 @@ void TabContentManager::DetachLiveLayer(int tab_id,
}
}
void TabContentManager::OnFinishDecompressThumbnail(int tab_id,
bool success,
SkBitmap bitmap) {
JNIEnv* env = base::android::AttachCurrentThread();
ScopedJavaLocalRef<jobject> java_bitmap;
if (success)
java_bitmap = gfx::ConvertToJavaBitmap(&bitmap);
Java_TabContentManager_notifyDecompressBitmapFinished(
env, weak_java_tab_content_manager_.get(env), tab_id, java_bitmap);
}
jboolean TabContentManager::HasFullCachedThumbnail(
JNIEnv* env,
const JavaParamRef<jobject>& obj,
......
......@@ -69,8 +69,6 @@ class TabContentManager : public ThumbnailCacheObserver {
// make sure all live layers are detached.
void DetachLiveLayer(int tab_id, scoped_refptr<cc::Layer> layer);
// Callback for when the thumbnail decompression for tab_id is done.
void OnFinishDecompressThumbnail(int tab_id, bool success, SkBitmap bitmap);
// JNI methods.
jboolean HasFullCachedThumbnail(
JNIEnv* env,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment