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

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

Issue 2469863010: Move all ProvisionFetcher classes out of android/ subdirectories. (Closed)
Patch Set: Fix chrome/ includes missed in PS1. 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
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_ANDROID_PROVISION_FETCHER_H_ 5 #ifndef MEDIA_BASE_PROVISION_FETCHER_H_
6 #define MEDIA_BASE_ANDROID_PROVISION_FETCHER_H_ 6 #define MEDIA_BASE_PROVISION_FETCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "media/base/media_export.h" 12 #include "media/base/media_export.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 // The interface to retrieve provision information for MediaDrmBridge. 16 // The interface to retrieve provision information for CDM.
17 class MEDIA_EXPORT ProvisionFetcher { 17 class MEDIA_EXPORT ProvisionFetcher {
18 public: 18 public:
19 // After provision information is retrieved this callback will be called 19 // After provision information is retrieved this callback will be called
20 // with the status flag (success/failure) and the provision response in 20 // with the status flag (success/failure) and the provision response in
21 // case of success. 21 // case of success.
22 using ResponseCB = 22 using ResponseCB =
23 base::Callback<void(bool success, const std::string& response)>; 23 base::Callback<void(bool success, const std::string& response)>;
24 24
25 virtual ~ProvisionFetcher() {} 25 virtual ~ProvisionFetcher() {}
26 26
27 // Requests the provision information with |default_url| and |request_data| 27 // Requests the provision information with |default_url| and |request_data|
28 // and calls |response_cb| callback with the response. The input parameters 28 // and calls |response_cb| callback with the response. On Android, the input
29 // |default_url| and |request_data| corresponds to Java class 29 // parameters |default_url| and |request_data| corresponds to Java class
30 // MediaDrm.ProvisionRequest. 30 // MediaDrm.ProvisionRequest.
31 // The implementation must call |response_cb| asynchronously on the same 31 // The implementation must call |response_cb| asynchronously on the same
32 // thread that this method is called. 32 // thread that this method is called.
33 virtual void Retrieve(const std::string& default_url, 33 virtual void Retrieve(const std::string& default_url,
34 const std::string& request_data, 34 const std::string& request_data,
35 const ResponseCB& response_cb) = 0; 35 const ResponseCB& response_cb) = 0;
36 }; 36 };
37 37
38 using CreateFetcherCB = base::Callback<std::unique_ptr<ProvisionFetcher>()>; 38 using CreateFetcherCB = base::Callback<std::unique_ptr<ProvisionFetcher>()>;
39 39
40 } // namespace media 40 } // namespace media
41 41
42 #endif // MEDIA_BASE_ANDROID_PROVISION_FETCHER_H_ 42 #endif // MEDIA_BASE_PROVISION_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698