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 "chrome/browser/ui/views/desktop_media_picker_views.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/media/desktop_media_list.h" | 10 #include "chrome/browser/media/desktop_media_list.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 const int kDesktopMediaSourceViewGroupId = 1; | 48 const int kDesktopMediaSourceViewGroupId = 1; |
49 | 49 |
50 const char kDesktopMediaSourceViewClassName[] = | 50 const char kDesktopMediaSourceViewClassName[] = |
51 "DesktopMediaPicker_DesktopMediaSourceView"; | 51 "DesktopMediaPicker_DesktopMediaSourceView"; |
52 | 52 |
53 DesktopMediaID::Id AcceleratedWidgetToDesktopMediaId( | 53 DesktopMediaID::Id AcceleratedWidgetToDesktopMediaId( |
54 gfx::AcceleratedWidget accelerated_widget) { | 54 gfx::AcceleratedWidget accelerated_widget) { |
55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
56 return reinterpret_cast<DesktopMediaID::Id>(accelerated_widget); | 56 return reinterpret_cast<DesktopMediaID::Id>(accelerated_widget); |
| 57 #elif defined(OS_ANDROID) |
| 58 // TODO(bshe): We may need to revisit this for Android platform. See |
| 59 // crbug.com/557424. |
| 60 NOTIMPLEMENTED(); |
| 61 return reinterpret_cast<DesktopMediaID::Id>(accelerated_widget); |
57 #else | 62 #else |
58 return static_cast<DesktopMediaID::Id>(accelerated_widget); | 63 return static_cast<DesktopMediaID::Id>(accelerated_widget); |
59 #endif | 64 #endif |
60 } | 65 } |
61 | 66 |
62 int GetMediaListViewHeightForRows(size_t rows) { | 67 int GetMediaListViewHeightForRows(size_t rows) { |
63 return kListItemHeight * rows; | 68 return kListItemHeight * rows; |
64 } | 69 } |
65 | 70 |
66 } // namespace | 71 } // namespace |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 content::BrowserThread::PostTask( | 600 content::BrowserThread::PostTask( |
596 content::BrowserThread::UI, FROM_HERE, | 601 content::BrowserThread::UI, FROM_HERE, |
597 base::Bind(callback_, source)); | 602 base::Bind(callback_, source)); |
598 callback_.Reset(); | 603 callback_.Reset(); |
599 } | 604 } |
600 | 605 |
601 // static | 606 // static |
602 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 607 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
603 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 608 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
604 } | 609 } |
OLD | NEW |