Remove aura enum from DesktopMediaID to fix desktop mirroring audio (CrOS).
commitf14d81317fd4eb14eafc66d9f013bc95848ff327
authormiu <miu@chromium.org>
Tue, 4 Aug 2015 00:36:36 +0000 (3 17:36 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 4 Aug 2015 00:37:42 +0000 (4 00:37 +0000)
tree8951c4cade4acfa96ea903d4bbf281d885a66322
parentadbe39c6374afc8cb153aff2f10edd6ee5b4307d
Remove aura enum from DesktopMediaID to fix desktop mirroring audio (CrOS).

This change removes the TYPE_AURA_WINDOW enum value from
content::DesktopMediaID, and requires the use of TYPE_WINDOW or
TYPE_SCREEN where appropriate.  This allows the logic that determines
whether to capture and mirror system-wide audio to work on CrOS.

Also cleaned up code in desktop_media_id.cc to reduce memory usage by
replacing base::Singleton with base::LazyInitializer and two std::maps
with a single std::vector (since there should always be fewer than
hundreds of entries).

BUG=468639,513093
TEST=Use Google Cast Extension to mirror the desktop to a Chromecast, play audio, and expect the audio to be heard from the Chromecast.

Review URL: https://codereview.chromium.org/1255573002

Cr-Commit-Position: refs/heads/master@{#341653}
12 files changed:
chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc
chrome/browser/media/desktop_capture_access_handler.cc
chrome/browser/media/desktop_media_list.h
chrome/browser/media/desktop_media_list_ash.cc
chrome/browser/media/fake_desktop_media_list.cc
chrome/browser/ui/views/desktop_media_picker_views.cc
content/browser/media/capture/desktop_capture_device_aura.cc
content/browser/media/capture/desktop_capture_device_aura.h
content/browser/media/capture/desktop_capture_device_aura_unittest.cc
content/browser/renderer_host/media/video_capture_manager.cc
content/public/browser/desktop_media_id.cc
content/public/browser/desktop_media_id.h