Chromium Code Reviews| Index: chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h |
| diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h b/chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h |
| index 9a3560c9193c7280fb35b700be599ceec4d0fabe..38a5804727a1b9fd6b8e49b0f5cfdedf3bd67e1b 100644 |
| --- a/chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h |
| +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h |
| @@ -21,22 +21,31 @@ struct DesktopMediaSourceViewStyle { |
| DesktopMediaSourceViewStyle(const DesktopMediaSourceViewStyle& style); |
| DesktopMediaSourceViewStyle(int columns, |
| const gfx::Size& item_size, |
| + const gfx::Rect& icon_rect, |
| const gfx::Rect& label_rect, |
| gfx::HorizontalAlignment text_alignment, |
| const gfx::Rect& image_rect, |
| int selection_border_thickness, |
| int focus_rectangle_inset); |
| + // This parameter controls how many source view can be displayed in a row. |
|
sky
2016/08/26 16:40:35
source views?
qiangchen
2016/08/26 17:30:01
change all "items" and "sources" to be "source ite
|
| int columns; |
| + // The size of a single item. |
|
sky
2016/08/26 16:40:35
How does columns and item_size relate? In the desc
qiangchen
2016/08/26 17:30:01
same.
|
| gfx::Size item_size; |
| + // The relative position to display icon, label and preview image. |
| + gfx::Rect icon_rect; |
| gfx::Rect label_rect; |
| gfx::HorizontalAlignment text_alignment; |
| - |
| gfx::Rect image_rect; |
| + |
| + // When a source is selected, we paint the border to show it. This parameter |
|
sky
2016/08/26 16:40:35
This is a good description!
qiangchen
2016/08/26 17:30:01
Acknowledged.
|
| + // controls how thick the border would be. |
| int selection_border_thickness; |
| + // When a source is focused, we paint dotted line. This parameter controls |
| + // the distance between dotted line and the source view boundary. |
| int focus_rectangle_inset; |
| }; |
| @@ -55,6 +64,7 @@ class DesktopMediaSourceView : public views::View { |
| // Updates thumbnail and title from |source|. |
| void SetName(const base::string16& name); |
| void SetThumbnail(const gfx::ImageSkia& thumbnail); |
| + void SetIcon(const gfx::ImageSkia& icon); |
| // Id for the source shown by this View. |
| const content::DesktopMediaID& source_id() const { return source_id_; } |
| @@ -89,6 +99,7 @@ class DesktopMediaSourceView : public views::View { |
| content::DesktopMediaID source_id_; |
| DesktopMediaSourceViewStyle style_; |
| + views::ImageView* icon_view_; |
| views::ImageView* image_view_; |
| views::Label* label_; |