Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: chrome/common/media/media_resource_provider.cc

Issue 1362093002: Re-land: Add localized default audio device names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude media_resource_provider on iOS. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/media/media_resource_provider.h ('k') | chrome/renderer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "chrome/common/media/media_resource_provider.h"
7 #include "chrome/grit/generated_resources.h"
8 #include "ui/base/l10n/l10n_util.h"
9
10 namespace chrome_common_media {
11
12 int MediaMessageIdToGrdId(media::MessageId message_id) {
13 switch (message_id) {
14 case media::DEFAULT_AUDIO_DEVICE_NAME:
15 return IDS_DEFAULT_AUDIO_DEVICE_NAME;
16 #if defined(OS_WIN)
17 case media::COMMUNICATIONS_AUDIO_DEVICE_NAME:
18 return IDS_COMMUNICATIONS_AUDIO_DEVICE_NAME;
19 #endif
20 #if defined(OS_CHROMEOS)
21 case media::BEAMFORMING_ON_DEFAULT_AUDIO_INPUT_DEVICE_NAME:
22 return IDS_BEAMFORMING_ON_DEFAULT_AUDIO_INPUT_DEVICE_NAME;
23 case media::BEAMFORMING_OFF_DEFAULT_AUDIO_INPUT_DEVICE_NAME:
24 return IDS_BEAMFORMING_OFF_DEFAULT_AUDIO_INPUT_DEVICE_NAME;
25 #endif
26 default:
27 NOTREACHED();
28 return 0;
29 }
30 }
31
32 base::string16 LocalizedStringProvider(media::MessageId message_id) {
33 return l10n_util::GetStringUTF16(MediaMessageIdToGrdId(message_id));
34 }
35
36 } // namespace chrome_common_media
OLDNEW
« no previous file with comments | « chrome/common/media/media_resource_provider.h ('k') | chrome/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698