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

Unified Diff: chrome/browser/media/desktop_media_list.h

Issue 1503563004: Desktop chrome tab capture-chooseDesktopMedia() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/media/desktop_media_list.h
diff --git a/chrome/browser/media/desktop_media_list.h b/chrome/browser/media/desktop_media_list.h
index 86ac37c02f869e0c1f2813b84ac5bbbbac0c38f6..d310f502e6cad806fdeb9249ad2963c8a40789e0 100644
--- a/chrome/browser/media/desktop_media_list.h
+++ b/chrome/browser/media/desktop_media_list.h
@@ -5,9 +5,10 @@
#ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
#define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
-#include "base/strings/string16.h"
#include "base/time/time.h"
#include "content/public/browser/desktop_media_id.h"
+#include "content/public/browser/web_contents_observer.h"
+#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
class DesktopMediaListObserver;
@@ -57,4 +58,19 @@ class DesktopMediaList {
virtual const Source& GetSource(int index) const = 0;
};
+// Create a image with an enlarged favicon on its center and black boundary.
+// If fails, an empty image will return.
+// The function is used to create a thumbnail for chrome tab preview.
+gfx::ImageSkia CreateEnlargedFaviconImage(gfx::Size size, gfx::Image& favicon);
+
+// Observer of WebContents to detect whether WebContents has been destroyed.
+class MediaListWebContentsObserver : public content::WebContentsObserver {
Avi (use Gerrit) 2016/01/08 17:11:38 This is not a useful class; it exists but override
GeorgeZ 2016/01/08 19:39:02 Done.
+ public:
+ explicit MediaListWebContentsObserver(content::WebContents* contents) {
+ Observe(contents);
+ }
+
+ DISALLOW_COPY_AND_ASSIGN(MediaListWebContentsObserver);
+};
+
#endif // CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_

Powered by Google App Engine
This is Rietveld 408576698