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

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

Issue 448893002: Update ClearKey to support CDM_6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cdm6
Patch Set: Changes Created 6 years, 4 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CDM_PROMISE_H_ 5 #ifndef MEDIA_BASE_CDM_PROMISE_H_
6 #define MEDIA_BASE_CDM_PROMISE_H_ 6 #define MEDIA_BASE_CDM_PROMISE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 }; 50 };
51 51
52 template <typename T> 52 template <typename T>
53 class MEDIA_EXPORT CdmPromiseTemplate : public CdmPromise { 53 class MEDIA_EXPORT CdmPromiseTemplate : public CdmPromise {
54 public: 54 public:
55 CdmPromiseTemplate(base::Callback<void(const T&)> resolve_cb, 55 CdmPromiseTemplate(base::Callback<void(const T&)> resolve_cb,
56 PromiseRejectedCB rejected_cb); 56 PromiseRejectedCB rejected_cb);
57 virtual ~CdmPromiseTemplate(); 57 virtual ~CdmPromiseTemplate();
58 virtual void resolve(const T& result); 58 virtual void resolve(const T& result);
59 59
60 protected:
61 // Allow subclasses to completely override the implementation.
62 CdmPromiseTemplate();
ddorwin 2014/08/11 20:34:16 Add a TODO to remove it so we don't forget.
jrummell 2014/08/13 21:18:06 Done.
63
60 private: 64 private:
61 base::Callback<void(const T&)> resolve_cb_; 65 base::Callback<void(const T&)> resolve_cb_;
62 66
63 DISALLOW_COPY_AND_ASSIGN(CdmPromiseTemplate); 67 DISALLOW_COPY_AND_ASSIGN(CdmPromiseTemplate);
64 }; 68 };
65 69
66 // Specialization for no parameter to resolve(). 70 // Specialization for no parameter to resolve().
67 template <> 71 template <>
68 class MEDIA_EXPORT CdmPromiseTemplate<void> : public CdmPromise { 72 class MEDIA_EXPORT CdmPromiseTemplate<void> : public CdmPromise {
69 public: 73 public:
70 CdmPromiseTemplate(base::Callback<void(void)> resolve_cb, 74 CdmPromiseTemplate(base::Callback<void(void)> resolve_cb,
71 PromiseRejectedCB rejected_cb); 75 PromiseRejectedCB rejected_cb);
72 virtual ~CdmPromiseTemplate(); 76 virtual ~CdmPromiseTemplate();
73 virtual void resolve(); 77 virtual void resolve();
74 78
75 protected: 79 protected:
76 // Allow subclasses to completely override the implementation. 80 // Allow subclasses to completely override the implementation.
77 CdmPromiseTemplate(); 81 CdmPromiseTemplate();
78 82
79 private: 83 private:
80 base::Callback<void(void)> resolve_cb_; 84 base::Callback<void(void)> resolve_cb_;
81 85
82 DISALLOW_COPY_AND_ASSIGN(CdmPromiseTemplate); 86 DISALLOW_COPY_AND_ASSIGN(CdmPromiseTemplate);
83 }; 87 };
84 88
85 } // namespace media 89 } // namespace media
86 90
87 #endif // MEDIA_BASE_CDM_PROMISE_H_ 91 #endif // MEDIA_BASE_CDM_PROMISE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698