| 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); | |
| 62 #else | 57 #else |
| 63 return static_cast<DesktopMediaID::Id>(accelerated_widget); | 58 return static_cast<DesktopMediaID::Id>(accelerated_widget); |
| 64 #endif | 59 #endif |
| 65 } | 60 } |
| 66 | 61 |
| 67 int GetMediaListViewHeightForRows(size_t rows) { | 62 int GetMediaListViewHeightForRows(size_t rows) { |
| 68 return kListItemHeight * rows; | 63 return kListItemHeight * rows; |
| 69 } | 64 } |
| 70 | 65 |
| 71 } // namespace | 66 } // namespace |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 content::BrowserThread::PostTask( | 595 content::BrowserThread::PostTask( |
| 601 content::BrowserThread::UI, FROM_HERE, | 596 content::BrowserThread::UI, FROM_HERE, |
| 602 base::Bind(callback_, source)); | 597 base::Bind(callback_, source)); |
| 603 callback_.Reset(); | 598 callback_.Reset(); |
| 604 } | 599 } |
| 605 | 600 |
| 606 // static | 601 // static |
| 607 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 602 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
| 608 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 603 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
| 609 } | 604 } |
| OLD | NEW |