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" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // Returns currently selected source. | 39 // Returns currently selected source. |
40 DesktopMediaSourceView* GetSelection(); | 40 DesktopMediaSourceView* GetSelection(); |
41 | 41 |
42 // views::View overrides. | 42 // views::View overrides. |
43 gfx::Size GetPreferredSize() const override; | 43 gfx::Size GetPreferredSize() const override; |
44 void Layout() override; | 44 void Layout() override; |
45 bool OnKeyPressed(const ui::KeyEvent& event) override; | 45 bool OnKeyPressed(const ui::KeyEvent& event) override; |
46 | 46 |
47 private: | 47 private: |
48 // DesktopMediaList::Observer interface | 48 // DesktopMediaList::Observer interface |
49 void OnSourceAdded(int index) override; | 49 void OnSourceAdded(DesktopMediaList* list, int index) override; |
50 void OnSourceRemoved(int index) override; | 50 void OnSourceRemoved(DesktopMediaList* list, int index) override; |
51 void OnSourceMoved(int old_index, int new_index) override; | 51 void OnSourceMoved(DesktopMediaList* list, |
52 void OnSourceNameChanged(int index) override; | 52 int old_index, |
53 void OnSourceThumbnailChanged(int index) override; | 53 int new_index) override; |
| 54 void OnSourceNameChanged(DesktopMediaList* list, int index) override; |
| 55 void OnSourceThumbnailChanged(DesktopMediaList* list, int index) override; |
54 | 56 |
55 // Accepts whatever happens to be selected right now. | 57 // Accepts whatever happens to be selected right now. |
56 void AcceptSelection(); | 58 void AcceptSelection(); |
57 | 59 |
58 DesktopMediaPickerDialogView* parent_; | 60 DesktopMediaPickerDialogView* parent_; |
59 scoped_ptr<DesktopMediaList> media_list_; | 61 scoped_ptr<DesktopMediaList> media_list_; |
60 base::WeakPtrFactory<DesktopMediaListView> weak_factory_; | 62 base::WeakPtrFactory<DesktopMediaListView> weak_factory_; |
61 | 63 |
62 DISALLOW_COPY_AND_ASSIGN(DesktopMediaListView); | 64 DISALLOW_COPY_AND_ASSIGN(DesktopMediaListView); |
63 }; | 65 }; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 183 |
182 // The |dialog_| is owned by the corresponding views::Widget instance. | 184 // The |dialog_| is owned by the corresponding views::Widget instance. |
183 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed | 185 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed |
184 // asynchronously by closing the widget. | 186 // asynchronously by closing the widget. |
185 DesktopMediaPickerDialogView* dialog_; | 187 DesktopMediaPickerDialogView* dialog_; |
186 | 188 |
187 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews); | 189 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews); |
188 }; | 190 }; |
189 | 191 |
190 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ | 192 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ |
OLD | NEW |