Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/views/desktop_media_picker_views.h" | 5 #include "desktop_media_picker_views_deprecated.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "chrome/browser/media/combined_desktop_media_list.h" | 14 #include "chrome/browser/media/combined_desktop_media_list.h" |
| 15 #include "chrome/browser/media/desktop_media_list.h" | 15 #include "chrome/browser/media/desktop_media_list.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 return static_cast<DesktopMediaID::Id>(accelerated_widget); | 67 return static_cast<DesktopMediaID::Id>(accelerated_widget); |
| 68 #endif | 68 #endif |
| 69 } | 69 } |
| 70 | 70 |
| 71 int GetMediaListViewHeightForRows(size_t rows) { | 71 int GetMediaListViewHeightForRows(size_t rows) { |
| 72 return kListItemHeight * rows; | 72 return kListItemHeight * rows; |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace | 75 } // namespace |
| 76 | 76 |
| 77 namespace deprecated { | |
|
msw
2016/05/02 23:49:59
nit: add a blank line below.
qiangchen
2016/05/05 22:17:54
Done.
| |
| 77 DesktopMediaSourceView::DesktopMediaSourceView( | 78 DesktopMediaSourceView::DesktopMediaSourceView( |
| 78 DesktopMediaListView* parent, | 79 DesktopMediaListView* parent, |
| 79 DesktopMediaID source_id) | 80 DesktopMediaID source_id) |
| 80 : parent_(parent), | 81 : parent_(parent), |
| 81 source_id_(source_id), | 82 source_id_(source_id), |
| 82 image_view_(new views::ImageView()), | 83 image_view_(new views::ImageView()), |
| 83 label_(new views::Label()), | 84 label_(new views::Label()), |
| 84 selected_(false) { | 85 selected_(false) { |
| 85 AddChildView(image_view_); | 86 AddChildView(image_view_); |
| 86 AddChildView(label_); | 87 AddChildView(label_); |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 659 DCHECK(!callback_.is_null()); | 660 DCHECK(!callback_.is_null()); |
| 660 | 661 |
| 661 // Notify the |callback_| asynchronously because it may need to destroy | 662 // Notify the |callback_| asynchronously because it may need to destroy |
| 662 // DesktopMediaPicker. | 663 // DesktopMediaPicker. |
| 663 content::BrowserThread::PostTask( | 664 content::BrowserThread::PostTask( |
| 664 content::BrowserThread::UI, FROM_HERE, | 665 content::BrowserThread::UI, FROM_HERE, |
| 665 base::Bind(callback_, source)); | 666 base::Bind(callback_, source)); |
| 666 callback_.Reset(); | 667 callback_.Reset(); |
| 667 } | 668 } |
| 668 | 669 |
| 669 // static | 670 } // namespace deprecated |
| 670 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | |
| 671 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | |
| 672 } | |
| OLD | NEW |