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

Side by Side Diff: media/base/media_resources.h

Issue 2474803002: [Media Remoting] Add function to create interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 1 month 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.cc ('k') | media/remoting/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
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 #ifndef MEDIA_BASE_MEDIA_RESOURCES_H_ 5 #ifndef MEDIA_BASE_MEDIA_RESOURCES_H_
6 #define MEDIA_BASE_MEDIA_RESOURCES_H_ 6 #define MEDIA_BASE_MEDIA_RESOURCES_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "media/base/media_export.h" 12 #include "media/base/media_export.h"
13 #include "media/media_features.h"
13 14
14 namespace media { 15 namespace media {
15 16
16 // The media layer can't access Chrome's resource bundle directly. This facility 17 // The media layer can't access Chrome's resource bundle directly. This facility
17 // allows clients to provide indirect access. 18 // allows clients to provide indirect access.
18 19
19 // IDs that will get mapped to corresponding entries with IDS_ prefixes in 20 // IDs that will get mapped to corresponding entries with IDS_ prefixes in
20 // chrome/app/generated_resources.grd. 21 // chrome/app/generated_resources.grd.
21 enum MessageId { 22 enum MessageId {
22 DEFAULT_AUDIO_DEVICE_NAME, 23 DEFAULT_AUDIO_DEVICE_NAME,
23 #if defined(OS_WIN) 24 #if defined(OS_WIN)
24 COMMUNICATIONS_AUDIO_DEVICE_NAME, 25 COMMUNICATIONS_AUDIO_DEVICE_NAME,
25 #endif 26 #endif
26 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
27 BEAMFORMING_ON_DEFAULT_AUDIO_INPUT_DEVICE_NAME, 28 BEAMFORMING_ON_DEFAULT_AUDIO_INPUT_DEVICE_NAME,
28 BEAMFORMING_OFF_DEFAULT_AUDIO_INPUT_DEVICE_NAME, 29 BEAMFORMING_OFF_DEFAULT_AUDIO_INPUT_DEVICE_NAME,
29 #endif 30 #endif
31 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
32 MEDIA_REMOTING_CAST_ERROR_TEXT,
33 MEDIA_REMOTING_CASTING_VIDEO_TEXT,
34 #endif
30 }; 35 };
31 36
32 // Implementations are expected to convert MessageIds to generated_resources.grd 37 // Implementations are expected to convert MessageIds to generated_resources.grd
33 // IDs and extract the matching string from Chrome's resource bundle (e.g. 38 // IDs and extract the matching string from Chrome's resource bundle (e.g.
34 // through l10n_util::GetStringUTF16). 39 // through l10n_util::GetStringUTF16).
35 using LocalizedStringProvider = base::string16 (*)(MessageId message_id); 40 using LocalizedStringProvider = base::string16 (*)(MessageId message_id);
36 41
37 // Initializes the global LocalizedStringProvider function. 42 // Initializes the global LocalizedStringProvider function.
38 MEDIA_EXPORT void SetLocalizedStringProvider(LocalizedStringProvider func); 43 MEDIA_EXPORT void SetLocalizedStringProvider(LocalizedStringProvider func);
39 44
40 #if !defined(OS_IOS) 45 #if !defined(OS_IOS)
41 // The LocalizedStringProvider has probably not been initialized on iOS. This 46 // The LocalizedStringProvider has probably not been initialized on iOS. This
42 // will give an early compile warning for clients attempting to use it. 47 // will give an early compile warning for clients attempting to use it.
43 48
44 // Returns a resource string corresponding to |message_id|. See l10n_util.h. 49 // Returns a resource string corresponding to |message_id|. See l10n_util.h.
45 // Returns an empty string if the LocalizedStringProvider has not been 50 // Returns an empty string if the LocalizedStringProvider has not been
46 // initialized or if the ID is unrecognized. 51 // initialized or if the ID is unrecognized.
47 std::string GetLocalizedStringUTF8(MessageId message_id); 52 MEDIA_EXPORT std::string GetLocalizedStringUTF8(MessageId message_id);
48 base::string16 GetLocalizedStringUTF16(MessageId message_id); 53 base::string16 GetLocalizedStringUTF16(MessageId message_id);
49 #endif 54 #endif
50 55
51 } // namespace media 56 } // namespace media
52 57
53 #endif // MEDIA_BASE_MEDIA_RESOURCES_H_ 58 #endif // MEDIA_BASE_MEDIA_RESOURCES_H_
OLDNEW
« no previous file with comments | « chrome/common/media/media_resource_provider.cc ('k') | media/remoting/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698