BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / media / base / android / media_client_android.h
blob0753b3b5e13021f367e97c536cb59913476f4494
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.
5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_
8 #include <string>
9 #include <utility>
10 #include <vector>
12 #include "base/containers/hash_tables.h"
13 #include "base/macros.h"
14 #include "media/base/media_export.h"
16 namespace media {
18 class MediaClientAndroid;
19 class MediaDrmBridgeDelegate;
21 // Setter for MediaClientAndroid. This should be called early in embedder
22 // lifecycle, before any media playback could occur.
23 MEDIA_EXPORT void SetMediaClientAndroid(MediaClientAndroid* media_client);
25 #if defined(MEDIA_IMPLEMENTATION)
26 // Getter for the client. Returns nullptr if no customized client is needed.
27 MediaClientAndroid* GetMediaClientAndroid();
28 #endif
30 using UUID = std::vector<uint8_t>;
32 // A client interface for embedders (e.g. content/browser) to provide customized
33 // additions to Android's browser-side media handling.
34 class MEDIA_EXPORT MediaClientAndroid {
35 public:
36 typedef base::hash_map<std::string, UUID> KeySystemUuidMap;
38 MediaClientAndroid();
39 virtual ~MediaClientAndroid();
41 // Adds extra mappings from key-system name to Android UUID into |map|.
42 virtual void AddKeySystemUUIDMappings(KeySystemUuidMap* map);
44 // Returns a MediaDrmBridgeDelegate that corresponds to |scheme_uuid|.
45 // MediaClientAndroid retains ownership.
46 virtual media::MediaDrmBridgeDelegate* GetMediaDrmBridgeDelegate(
47 const UUID& scheme_uuid);
49 private:
50 friend class KeySystemManager;
52 base::hash_map<std::string, UUID> key_system_uuid_map_;
54 DISALLOW_COPY_AND_ASSIGN(MediaClientAndroid);
57 } // namespace media
59 #endif // MEDIA_BASE_ANDROID_MEDIA_CLIENT_ANDROID_H_