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

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

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_
6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ 6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h"
12 #include "base/callback.h" 11 #include "base/callback.h"
13 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
15 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
16 #include "media/base/media_keys.h" 15 #include "media/base/media_keys.h"
17 #include "media/blink/new_session_cdm_result_promise.h" 16 #include "media/blink/new_session_cdm_result_promise.h"
18 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h " 17 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h "
19 #include "third_party/WebKit/public/platform/WebString.h" 18 #include "third_party/WebKit/public/platform/WebString.h"
20 19
21 namespace media { 20 namespace media {
(...skipping 13 matching lines...) Expand all
35 blink::WebString sessionId() const override; 34 blink::WebString sessionId() const override;
36 35
37 void initializeNewSession( 36 void initializeNewSession(
38 blink::WebEncryptedMediaInitDataType init_data_type, 37 blink::WebEncryptedMediaInitDataType init_data_type,
39 const unsigned char* initData, 38 const unsigned char* initData,
40 size_t initDataLength, 39 size_t initDataLength,
41 blink::WebEncryptedMediaSessionType session_type, 40 blink::WebEncryptedMediaSessionType session_type,
42 blink::WebContentDecryptionModuleResult result) override; 41 blink::WebContentDecryptionModuleResult result) override;
43 void load(const blink::WebString& session_id, 42 void load(const blink::WebString& session_id,
44 blink::WebContentDecryptionModuleResult result) override; 43 blink::WebContentDecryptionModuleResult result) override;
45 void update(const uint8* response, 44 void update(const uint8_t* response,
46 size_t response_length, 45 size_t response_length,
47 blink::WebContentDecryptionModuleResult result) override; 46 blink::WebContentDecryptionModuleResult result) override;
48 void close(blink::WebContentDecryptionModuleResult result) override; 47 void close(blink::WebContentDecryptionModuleResult result) override;
49 void remove(blink::WebContentDecryptionModuleResult result) override; 48 void remove(blink::WebContentDecryptionModuleResult result) override;
50 49
51 // Callbacks. 50 // Callbacks.
52 void OnSessionMessage(MediaKeys::MessageType message_type, 51 void OnSessionMessage(MediaKeys::MessageType message_type,
53 const std::vector<uint8>& message); 52 const std::vector<uint8_t>& message);
54 void OnSessionKeysChange(bool has_additional_usable_key, 53 void OnSessionKeysChange(bool has_additional_usable_key,
55 CdmKeysInfo keys_info); 54 CdmKeysInfo keys_info);
56 void OnSessionExpirationUpdate(const base::Time& new_expiry_time); 55 void OnSessionExpirationUpdate(const base::Time& new_expiry_time);
57 void OnSessionClosed(); 56 void OnSessionClosed();
58 57
59 private: 58 private:
60 // Called when a new session is created or loaded. |status| is set as 59 // Called when a new session is created or loaded. |status| is set as
61 // appropriate, depending on whether the session already exists or not. 60 // appropriate, depending on whether the session already exists or not.
62 void OnSessionInitialized(const std::string& session_id, 61 void OnSessionInitialized(const std::string& session_id,
63 SessionInitStatus* status); 62 SessionInitStatus* status);
(...skipping 18 matching lines...) Expand all
82 // creating a promise in case this class disappears before the promise 81 // creating a promise in case this class disappears before the promise
83 // actually fires. 82 // actually fires.
84 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_; 83 base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_;
85 84
86 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl); 85 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl);
87 }; 86 };
88 87
89 } // namespace media 88 } // namespace media
90 89
91 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_ 90 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698