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

Unified Diff: chrome/browser/android/thumbnail/thumbnail.h

Issue 262543002: android: add ThumbnailCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@codec
Patch Set: separate into multiple files Created 6 years, 6 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/browser/android/thumbnail/thumbnail.h
diff --git a/chrome/browser/android/thumbnail/thumbnail.h b/chrome/browser/android/thumbnail/thumbnail.h
new file mode 100644
index 0000000000000000000000000000000000000000..2051240ae5d7f99e4a5fb552f54b3467b08783b4
--- /dev/null
+++ b/chrome/browser/android/thumbnail/thumbnail.h
@@ -0,0 +1,35 @@
+// 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.
+
+#ifndef CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_
+#define CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_
+
+#include "base/memory/ref_counted.h"
+#include "cc/resources/ui_resource_client.h"
+
+namespace gfx {
+class Size;
+class SizeF;
+}
+
+typedef int TabId;
+
+class Thumbnail : public base::RefCountedThreadSafe<Thumbnail> {
+ public:
+ // Returns the size of the content represented by this thumbnail. Content
+ // may be smaller than the data size because ETC1 pads the border of the
+ // images.
+ virtual gfx::Size GetScaledContentSize() const = 0;
+ // Returns data size of the thumbnail after scaling..
+ virtual gfx::SizeF GetScaledDataSize() const = 0;
+ virtual cc::UIResourceId ui_resource_id() const = 0;
+ virtual TabId tab_id() const = 0;
+
+ protected:
+ virtual ~Thumbnail() {}
+
+ friend class base::RefCountedThreadSafe<Thumbnail>;
+};
+
+#endif // CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_

Powered by Google App Engine
This is Rietveld 408576698