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

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

Issue 1427183002: Move MediaDrmBridge provision communication to native side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: For on-demand provisioning the fetcher is created in content/ and depends on the renderer. Created 5 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
(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 #ifndef MEDIA_BASE_PROVISION_FETCHER_H
6 #define MEDIA_BASE_PROVISION_FETCHER_H
7
8 #include <string>
xhwang 2015/11/06 23:08:19 style nit: one empty line here
Tima Vaisburd 2015/11/11 03:03:34 Done.
9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h"
xhwang 2015/11/06 23:08:19 not used?
Tima Vaisburd 2015/11/11 03:03:34 Removed
11 #include "media/base/media_export.h"
12
13 namespace media {
14
15 // The interface to retrieve provision information for MediaDrmBridge.
16 class MEDIA_EXPORT ProvisionFetcher {
17 public:
18 // After provision information is retrieved this callback will be called
19 // with the status flag (success/failure) and the provision response in
20 // case of success.
21 using ResponseCB =
22 base::Callback<void(bool success, const std::string& response)>;
23
24 virtual ~ProvisionFetcher() {}
25
26 // Requests the provision information with |default_url| and |request_data|
27 // and calls |cb| callback with the response. The input parameters
28 // |default_url| and |request_data| corresponds to Java class
29 // MediaDrm.ProvisionRequest.
30 // The implementation must call |cb| on the same thread that this method
xhwang 2015/11/06 23:08:19 nit: s/cb/response_cb Also, the callback should b
Tima Vaisburd 2015/11/11 03:03:34 Done.
31 // is called.
32 virtual void Retrieve(const std::string& default_url,
33 const std::string& request_data,
34 const ResponseCB& response_cb) = 0;
35 };
xhwang 2015/11/06 23:08:19 DISALLOW_COPY_AND_ASSIGN
Tima Vaisburd 2015/11/11 03:03:34 Why do we need to require this here?
xhwang 2015/11/11 09:53:21 Acknowledged.
36
37 } // namespace media
38
39 #endif // MEDIA_BASE_PROVISION_FETCHER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698