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

Side by Side Diff: media/blink/new_session_cdm_result_promise.h

Issue 655713003: Standardize usage of virtual/override/final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_ 5 #ifndef MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
6 #define MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_ 6 #define MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 11 matching lines...) Expand all
22 // promise returns the session ID (as a string), but the blink promise needs 22 // promise returns the session ID (as a string), but the blink promise needs
23 // to get passed a SessionStatus. This class converts the session id to a 23 // to get passed a SessionStatus. This class converts the session id to a
24 // SessionStatus by calling |new_session_created_cb|. 24 // SessionStatus by calling |new_session_created_cb|.
25 class MEDIA_EXPORT NewSessionCdmResultPromise 25 class MEDIA_EXPORT NewSessionCdmResultPromise
26 : public CdmPromiseTemplate<std::string> { 26 : public CdmPromiseTemplate<std::string> {
27 public: 27 public:
28 NewSessionCdmResultPromise( 28 NewSessionCdmResultPromise(
29 const blink::WebContentDecryptionModuleResult& result, 29 const blink::WebContentDecryptionModuleResult& result,
30 const std::string& uma_name, 30 const std::string& uma_name,
31 const SessionInitializedCB& new_session_created_cb); 31 const SessionInitializedCB& new_session_created_cb);
32 virtual ~NewSessionCdmResultPromise(); 32 ~NewSessionCdmResultPromise() override;
33 33
34 // CdmPromiseTemplate<T> implementation. 34 // CdmPromiseTemplate<T> implementation.
35 virtual void resolve(const std::string& web_session_id) override; 35 void resolve(const std::string& web_session_id) override;
36 virtual void reject(MediaKeys::Exception exception_code, 36 void reject(MediaKeys::Exception exception_code,
37 uint32 system_code, 37 uint32 system_code,
38 const std::string& error_message) override; 38 const std::string& error_message) override;
39 39
40 private: 40 private:
41 blink::WebContentDecryptionModuleResult web_cdm_result_; 41 blink::WebContentDecryptionModuleResult web_cdm_result_;
42 42
43 // UMA name to report result to. 43 // UMA name to report result to.
44 std::string uma_name_; 44 std::string uma_name_;
45 45
46 // Called on resolve() to convert the session ID into a SessionStatus to 46 // Called on resolve() to convert the session ID into a SessionStatus to
47 // be reported to blink. 47 // be reported to blink.
48 SessionInitializedCB new_session_created_cb_; 48 SessionInitializedCB new_session_created_cb_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(NewSessionCdmResultPromise); 50 DISALLOW_COPY_AND_ASSIGN(NewSessionCdmResultPromise);
51 }; 51 };
52 52
53 } // namespace media 53 } // namespace media
54 54
55 #endif // MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_ 55 #endif // MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
OLDNEW
« no previous file with comments | « media/blink/buffered_data_source_host_impl.h ('k') | media/blink/null_encrypted_media_player_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698