| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/media/desktop_media_list_observer.h" | 9 #include "chrome/browser/media/desktop_media_list_observer.h" |
| 10 #include "chrome/browser/media/desktop_media_picker.h" | 10 #include "chrome/browser/media/desktop_media_picker.h" |
| 11 #include "ui/views/window/dialog_delegate.h" | 11 #include "ui/views/window/dialog_delegate.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 class ImageView; | 14 class ImageView; |
| 15 class Label; | 15 class Label; |
| 16 class Checkbox; |
| 16 } // namespace views | 17 } // namespace views |
| 17 | 18 |
| 18 class DesktopMediaPickerDialogView; | 19 class DesktopMediaPickerDialogView; |
| 19 class DesktopMediaPickerViews; | 20 class DesktopMediaPickerViews; |
| 20 class DesktopMediaSourceView; | 21 class DesktopMediaSourceView; |
| 21 | 22 |
| 22 // View that shows a list of desktop media sources available from | 23 // View that shows a list of desktop media sources available from |
| 23 // DesktopMediaList. | 24 // DesktopMediaList. |
| 24 class DesktopMediaListView : public views::View, | 25 class DesktopMediaListView : public views::View, |
| 25 public DesktopMediaListObserver { | 26 public DesktopMediaListObserver { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 bool Accept() override; | 140 bool Accept() override; |
| 140 void DeleteDelegate() override; | 141 void DeleteDelegate() override; |
| 141 | 142 |
| 142 void OnMediaListRowsChanged(); | 143 void OnMediaListRowsChanged(); |
| 143 | 144 |
| 144 DesktopMediaListView* GetMediaListViewForTesting() const; | 145 DesktopMediaListView* GetMediaListViewForTesting() const; |
| 145 DesktopMediaSourceView* GetMediaSourceViewForTesting(int index) const; | 146 DesktopMediaSourceView* GetMediaSourceViewForTesting(int index) const; |
| 146 | 147 |
| 147 private: | 148 private: |
| 148 DesktopMediaPickerViews* parent_; | 149 DesktopMediaPickerViews* parent_; |
| 150 content::WebContents* web_contents_; |
| 149 base::string16 app_name_; | 151 base::string16 app_name_; |
| 150 | 152 |
| 151 views::Label* label_; | 153 views::Label* label_; |
| 152 views::ScrollView* scroll_view_; | 154 views::ScrollView* scroll_view_; |
| 153 DesktopMediaListView* list_view_; | 155 DesktopMediaListView* list_view_; |
| 156 views::Checkbox* checkbox_; |
| 157 bool audio_support_; |
| 154 | 158 |
| 155 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerDialogView); | 159 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerDialogView); |
| 156 }; | 160 }; |
| 157 | 161 |
| 158 // Implementation of DesktopMediaPicker for Views. | 162 // Implementation of DesktopMediaPicker for Views. |
| 159 class DesktopMediaPickerViews : public DesktopMediaPicker { | 163 class DesktopMediaPickerViews : public DesktopMediaPicker { |
| 160 public: | 164 public: |
| 161 DesktopMediaPickerViews(); | 165 DesktopMediaPickerViews(); |
| 162 ~DesktopMediaPickerViews() override; | 166 ~DesktopMediaPickerViews() override; |
| 163 | 167 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 181 | 185 |
| 182 // The |dialog_| is owned by the corresponding views::Widget instance. | 186 // The |dialog_| is owned by the corresponding views::Widget instance. |
| 183 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed | 187 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed |
| 184 // asynchronously by closing the widget. | 188 // asynchronously by closing the widget. |
| 185 DesktopMediaPickerDialogView* dialog_; | 189 DesktopMediaPickerDialogView* dialog_; |
| 186 | 190 |
| 187 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews); | 191 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews); |
| 188 }; | 192 }; |
| 189 | 193 |
| 190 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ | 194 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ |
| OLD | NEW |