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

Side by Side Diff: media/base/android/media_source_player_unittest.cc

Issue 17289006: Separate CDM initialization from GenerateKeyRequest & remove key_system parameters. (Closed) Base URL: master
Patch Set: rebase only Created 7 years, 6 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
« no previous file with comments | « media/base/android/media_player_manager.h ('k') | media/base/media_keys.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "media/base/android/media_codec_bridge.h" 9 #include "media/base/android/media_codec_bridge.h"
10 #include "media/base/android/media_player_manager.h" 10 #include "media/base/android/media_player_manager.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 virtual void OnMediaSeekRequest(int player_id, base::TimeDelta time_to_seek, 49 virtual void OnMediaSeekRequest(int player_id, base::TimeDelta time_to_seek,
50 unsigned seek_request_id) OVERRIDE { 50 unsigned seek_request_id) OVERRIDE {
51 last_seek_request_id_ = seek_request_id; 51 last_seek_request_id_ = seek_request_id;
52 } 52 }
53 virtual void OnMediaConfigRequest(int player_id) OVERRIDE {} 53 virtual void OnMediaConfigRequest(int player_id) OVERRIDE {}
54 virtual media::MediaDrmBridge* GetDrmBridge(int media_keys_id) OVERRIDE { 54 virtual media::MediaDrmBridge* GetDrmBridge(int media_keys_id) OVERRIDE {
55 return NULL; 55 return NULL;
56 } 56 }
57 virtual void OnKeyAdded(int key_id, 57 virtual void OnKeyAdded(int key_id,
58 const std::string& key_system,
59 const std::string& session_id) OVERRIDE {} 58 const std::string& session_id) OVERRIDE {}
60 virtual void OnKeyError(int key_id, 59 virtual void OnKeyError(int key_id,
61 const std::string& key_system,
62 const std::string& session_id, 60 const std::string& session_id,
63 media::MediaKeys::KeyError error_code, 61 media::MediaKeys::KeyError error_code,
64 int system_code) OVERRIDE {} 62 int system_code) OVERRIDE {}
65 virtual void OnKeyMessage(int key_id, 63 virtual void OnKeyMessage(int key_id,
66 const std::string& key_system,
67 const std::string& session_id, 64 const std::string& session_id,
68 const std::string& message, 65 const std::string& message,
69 const std::string& destination_url) OVERRIDE {} 66 const std::string& destination_url) OVERRIDE {}
70 67
71 int num_requests() { return num_requests_; } 68 int num_requests() { return num_requests_; }
72 unsigned last_seek_request_id() { return last_seek_request_id_; } 69 unsigned last_seek_request_id() { return last_seek_request_id_; }
73 70
74 private: 71 private:
75 // The number of request this object sents for decoding data. 72 // The number of request this object sents for decoding data.
76 int num_requests_; 73 int num_requests_;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 EXPECT_TRUE(NULL == GetMediaDecoderJob(false)); 230 EXPECT_TRUE(NULL == GetMediaDecoderJob(false));
234 EXPECT_EQ(1u, manager_->last_seek_request_id()); 231 EXPECT_EQ(1u, manager_->last_seek_request_id());
235 232
236 // Send the seek ack, player should start requesting data afterwards. 233 // Send the seek ack, player should start requesting data afterwards.
237 player_->OnSeekRequestAck(manager_->last_seek_request_id()); 234 player_->OnSeekRequestAck(manager_->last_seek_request_id());
238 EXPECT_TRUE(NULL != GetMediaDecoderJob(false)); 235 EXPECT_TRUE(NULL != GetMediaDecoderJob(false));
239 EXPECT_EQ(1, manager_->num_requests()); 236 EXPECT_EQ(1, manager_->num_requests());
240 } 237 }
241 238
242 } // namespace media 239 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_player_manager.h ('k') | media/base/media_keys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698