Index: chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h |
diff --git a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h |
index f0931e07113c5d358128055d01ebe450e6dda6d2..39f359ae43135c706b2af063d7e5d4a57c98a373 100644 |
--- a/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h |
+++ b/chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h |
@@ -20,11 +20,20 @@ |
// A controller for the Desktop Media Picker. Presents the user with a list of |
// media sources for screen-capturing, and reports the result. |
@interface DesktopMediaPickerController |
- : NSWindowController<NSWindowDelegate, DesktopMediaPickerObserver> { |
+ : NSWindowController<NSWindowDelegate, |
+ DesktopMediaPickerObserver, |
+ NSTableViewDataSource, |
+ NSTableViewDelegate> { |
@private |
- // The image browser view to present sources to the user (thumbnails and |
- // names). |
- base::scoped_nsobject<IKImageBrowserView> sourceBrowser_; |
+ // The image browser view or table view to present sources to the user |
+ // (thumbnails and names). |
+ base::scoped_nsobject<IKImageBrowserView> screenBrowser_; |
+ base::scoped_nsobject<IKImageBrowserView> windowBrowser_; |
+ base::scoped_nsobject<NSTableView> tabBrowser_; |
+ |
+ base::scoped_nsobject<NSScrollView> imageBrowserScroll_; |
+ |
+ base::scoped_nsobject<NSSegmentedControl> sourceTypeControl_; |
// The button used to confirm the selection. |
NSButton* shareButton_; // weak; owned by contentView |
@@ -33,22 +42,26 @@ |
NSButton* cancelButton_; // weak; owned by contentView |
// The checkbox for audio share. |
- // |audioShareState_| records the state when check box is disabled. |
base::scoped_nsobject<NSButton> audioShareCheckbox_; |
- NSCellStateValue audioShareState_; |
- // Provides source information (including thumbnails) to fill up |items_| and |
- // to render in |sourceBrowser_|. |
- std::unique_ptr<DesktopMediaList> media_list_; |
+ // Provides source information (including thumbnails) to fill up the array of |
+ // |screen_items_|, |window_items_| and |tab_items_|, and to render in |
tapted
2016/06/22 07:08:41
update comment (e.g. screen_items_ -> screenItems_
qiangchen
2016/06/22 23:54:23
Done.
|
+ // |screenBrowser_|, |windowBrowser_| and |tabBrowser_|. |
+ std::unique_ptr<DesktopMediaList> screenList_; |
+ std::unique_ptr<DesktopMediaList> windowList_; |
+ std::unique_ptr<DesktopMediaList> tabList_; |
// To be called with the user selection. |
DesktopMediaPicker::DoneCallback doneCallback_; |
- // Array of |DesktopMediaPickerItem| used as data for |sourceBrowser_|. |
- base::scoped_nsobject<NSMutableArray> items_; |
+ // Arrays of |DesktopMediaPickerItem| used as data for |screenBrowser|, |
tapted
2016/06/22 07:08:41
nit: screenBrowser -> screenBrowser_. also tab
qiangchen
2016/06/22 23:54:23
Done.
|
+ // |windowBrowser_| and |tabBrowser|. |
+ base::scoped_nsobject<NSMutableArray> screenItems_; |
+ base::scoped_nsobject<NSMutableArray> windowItems_; |
+ base::scoped_nsobject<NSMutableArray> tabItems_; |
- // C++ bridge to use as an observer to |media_list_|, that forwards obj-c |
- // notifications to this object. |
+ // C++ bridge to use as an observer to |screen_list_|, |window_list_| and |
tapted
2016/06/22 07:08:41
update
qiangchen
2016/06/22 23:54:23
Done.
|
+ // |tab_list_|, that forwards obj-c notifications to this object. |
std::unique_ptr<DesktopMediaPickerBridge> bridge_; |
// Used to create |DesktopMediaPickerItem|s with unique IDs. |
@@ -62,9 +75,9 @@ |
// appears as the initiator of the request. |
// |targetName| will be used to format the dialog's label and appear as the |
// consumer of the requested stream. |
-- (id)initWithScreenList:(std::unique_ptr<DesktopMediaList>)screen_list |
- windowList:(std::unique_ptr<DesktopMediaList>)window_list |
- tabList:(std::unique_ptr<DesktopMediaList>)tab_list |
+- (id)initWithScreenList:(std::unique_ptr<DesktopMediaList>)screenList |
+ windowList:(std::unique_ptr<DesktopMediaList>)windowList |
+ tabList:(std::unique_ptr<DesktopMediaList>)tabList |
parent:(NSWindow*)parent |
callback:(const DesktopMediaPicker::DoneCallback&)callback |
appName:(const base::string16&)appName |