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 "chrome/browser/media/desktop_media_list_observer.h" | 8 #include "chrome/browser/media/desktop_media_list_observer.h" |
9 #include "chrome/browser/media/desktop_media_picker.h" | 9 #include "chrome/browser/media/desktop_media_picker.h" |
10 #include "ui/views/window/dialog_delegate.h" | 10 #include "ui/views/window/dialog_delegate.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 void OnDoubleClick(); | 126 void OnDoubleClick(); |
127 | 127 |
128 // views::View overrides. | 128 // views::View overrides. |
129 gfx::Size GetPreferredSize() const override; | 129 gfx::Size GetPreferredSize() const override; |
130 void Layout() override; | 130 void Layout() override; |
131 | 131 |
132 // views::DialogDelegateView overrides. | 132 // views::DialogDelegateView overrides. |
133 ui::ModalType GetModalType() const override; | 133 ui::ModalType GetModalType() const override; |
134 base::string16 GetWindowTitle() const override; | 134 base::string16 GetWindowTitle() const override; |
135 bool IsDialogButtonEnabled(ui::DialogButton button) const override; | 135 bool IsDialogButtonEnabled(ui::DialogButton button) const override; |
| 136 views::View* GetInitiallyFocusedView() override; |
136 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; | 137 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
137 bool Accept() override; | 138 bool Accept() override; |
138 void DeleteDelegate() override; | 139 void DeleteDelegate() override; |
139 | 140 |
140 void OnMediaListRowsChanged(); | 141 void OnMediaListRowsChanged(); |
141 | 142 |
| 143 DesktopMediaListView* GetMediaListViewForTesting() const; |
142 DesktopMediaSourceView* GetMediaSourceViewForTesting(int index) const; | 144 DesktopMediaSourceView* GetMediaSourceViewForTesting(int index) const; |
143 | 145 |
144 private: | 146 private: |
145 DesktopMediaPickerViews* parent_; | 147 DesktopMediaPickerViews* parent_; |
146 base::string16 app_name_; | 148 base::string16 app_name_; |
147 | 149 |
148 views::Label* label_; | 150 views::Label* label_; |
149 views::ScrollView* scroll_view_; | 151 views::ScrollView* scroll_view_; |
150 DesktopMediaListView* list_view_; | 152 DesktopMediaListView* list_view_; |
151 | 153 |
(...skipping 26 matching lines...) Expand all Loading... |
178 | 180 |
179 // The |dialog_| is owned by the corresponding views::Widget instance. | 181 // The |dialog_| is owned by the corresponding views::Widget instance. |
180 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed | 182 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed |
181 // asynchronously by closing the widget. | 183 // asynchronously by closing the widget. |
182 DesktopMediaPickerDialogView* dialog_; | 184 DesktopMediaPickerDialogView* dialog_; |
183 | 185 |
184 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews); | 186 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews); |
185 }; | 187 }; |
186 | 188 |
187 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ | 189 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ |
OLD | NEW |