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

Side by Side 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: review round 1 Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_ 5 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
6 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_ 6 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "content/public/browser/desktop_media_id.h" 11 #include "content/public/browser/desktop_media_id.h"
12 #include "ui/gfx/image/image.h"
12 #include "ui/gfx/image/image_skia.h" 13 #include "ui/gfx/image/image_skia.h"
13 14
14 class DesktopMediaListObserver; 15 class DesktopMediaListObserver;
15 16
16 // DesktopMediaList provides the list of desktop media source (screens, windows, 17 // DesktopMediaList provides the list of desktop media source (screens, windows,
17 // tabs), and their thumbnails, to the desktop media picker dialog. It 18 // tabs), and their thumbnails, to the desktop media picker dialog. It
18 // transparently updates the list in the background, and notifies the desktop 19 // transparently updates the list in the background, and notifies the desktop
19 // media picker when something changes. 20 // media picker when something changes.
20 class DesktopMediaList { 21 class DesktopMediaList {
21 public: 22 public:
(...skipping 27 matching lines...) Expand all
49 50
50 // Starts updating the model. The model is initially empty, so OnSourceAdded() 51 // Starts updating the model. The model is initially empty, so OnSourceAdded()
51 // notifications will be generated for each existing source as it is 52 // notifications will be generated for each existing source as it is
52 // enumerated. After the initial enumeration the model will be refreshed based 53 // enumerated. After the initial enumeration the model will be refreshed based
53 // on the update period, and notifications generated only for changes in the 54 // on the update period, and notifications generated only for changes in the
54 // model. 55 // model.
55 virtual void StartUpdating(DesktopMediaListObserver* observer) = 0; 56 virtual void StartUpdating(DesktopMediaListObserver* observer) = 0;
56 57
57 virtual int GetSourceCount() const = 0; 58 virtual int GetSourceCount() const = 0;
58 virtual const Source& GetSource(int index) const = 0; 59 virtual const Source& GetSource(int index) const = 0;
60
61 protected:
62 // Create a image with an enlarged favicon on its center and black boundary.
63 // If fails, an empty image will return.
64 // The function is used to create a thumbnail for chrome tab preview.
65 static gfx::ImageSkia CreateImageEncloseFavicon(gfx::Size size,
miu 2015/12/12 00:00:33 naming nit: How about: CreateEnlargedFaviconImage(
66 gfx::Image& favicon);
59 }; 67 };
60 68
61 #endif // CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_ 69 #endif // CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698