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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/TitleCache.java

Issue 787023002: Upstream more layers, decoration title, layer_title_cache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: upstream resources as well Created 6 years 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/compositor/TitleCache.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/TitleCache.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/TitleCache.java
new file mode 100644
index 0000000000000000000000000000000000000000..8765b2bb9034d36cd342f06986a7300c37cd006a
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/TitleCache.java
@@ -0,0 +1,38 @@
+// Copyright 2014 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.compositor;
+
+import android.graphics.Bitmap;
+
+/**
+ * The interface that defines a {@link TitleCache}. The {@link TitleCache} is supposed to
+ * store one bitmap per tab. The retrieval type of the title image is up to the renderer's
+ * implementation.
+ */
+public interface TitleCache {
+ /**
+ * Put a {@link Tab} title bitmap in the cache.
+ * @param tabId The id of the {@link Tab}.
+ * @param titleBitmap The {@link Bitmap} representing the title of the {@link ChromeTab}.
+ * @param faviconBitmap The {@link Bitmap} representing the favicon of the {@link ChromeTab}.
+ * @param isIncognito True if the title is for an icognito tab.
+ * @param isRtl True if the title should be RTL.
+ */
+ void put(int tabId, Bitmap titleBitmap, Bitmap faviconBitmap, boolean isIncognito,
+ boolean isRtl);
+
+ /**
+ * Removes a title image from the cache.
+ * @param tabId The id of the {@link Tab} to remove from the cache.
+ */
+ void remove(int tabId);
+
+ /**
+ * Clears everything in the cache except for the provided tab id.
+ * @param tabId The id of the {@link Tab} to keep in the cache.
+ * Use {@link Tab.INVALID_TAB_ID} to clear everything in the cache.
+ */
+ void clearExcept(int tabId);
+}

Powered by Google App Engine
This is Rietveld 408576698