OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "build/build_config.h" |
6 #include "chrome/common/media/media_resource_provider.h" | 7 #include "chrome/common/media/media_resource_provider.h" |
7 #include "chrome/grit/generated_resources.h" | 8 #include "chrome/grit/generated_resources.h" |
8 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
9 | 10 |
10 namespace chrome_common_media { | 11 namespace chrome_common_media { |
11 | 12 |
12 int MediaMessageIdToGrdId(media::MessageId message_id) { | 13 int MediaMessageIdToGrdId(media::MessageId message_id) { |
13 switch (message_id) { | 14 switch (message_id) { |
14 case media::DEFAULT_AUDIO_DEVICE_NAME: | 15 case media::DEFAULT_AUDIO_DEVICE_NAME: |
15 return IDS_DEFAULT_AUDIO_DEVICE_NAME; | 16 return IDS_DEFAULT_AUDIO_DEVICE_NAME; |
(...skipping 11 matching lines...) Expand all Loading... |
27 NOTREACHED(); | 28 NOTREACHED(); |
28 return 0; | 29 return 0; |
29 } | 30 } |
30 } | 31 } |
31 | 32 |
32 base::string16 LocalizedStringProvider(media::MessageId message_id) { | 33 base::string16 LocalizedStringProvider(media::MessageId message_id) { |
33 return l10n_util::GetStringUTF16(MediaMessageIdToGrdId(message_id)); | 34 return l10n_util::GetStringUTF16(MediaMessageIdToGrdId(message_id)); |
34 } | 35 } |
35 | 36 |
36 } // namespace chrome_common_media | 37 } // namespace chrome_common_media |
OLD | NEW |