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

Unified Diff: media/base/mock_filters.h

Issue 11226019: Encrypted Media: Replace DecryptorClient with key event callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase again Created 8 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 side-by-side diff with in-line comments
Download patch
Index: media/base/mock_filters.h
diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
index d5a27b0bd956c385a21026730b2c6c07e87c6b81..1b47bcc40319807d54c622759ae25213ca8465db 100644
--- a/media/base/mock_filters.h
+++ b/media/base/mock_filters.h
@@ -20,7 +20,6 @@
#include "media/base/audio_renderer.h"
#include "media/base/decoder_buffer.h"
#include "media/base/decryptor.h"
-#include "media/base/decryptor_client.h"
#include "media/base/demuxer.h"
#include "media/base/filter_collection.h"
#include "media/base/pipeline_status.h"
@@ -208,8 +207,8 @@ class MockDecryptor : public Decryptor {
const std::string& session_id));
MOCK_METHOD2(CancelKeyRequest, void(const std::string& key_system,
const std::string& session_id));
- MOCK_METHOD2(RegisterKeyAddedCB, void(StreamType stream_type,
- const KeyAddedCB& key_added_cb));
+ MOCK_METHOD2(RegisterNewKeyCB, void(StreamType stream_type,
+ const NewKeyCB& new_key_cb));
MOCK_METHOD3(Decrypt, void(StreamType stream_type,
const scoped_refptr<DecoderBuffer>& encrypted,
const DecryptCB& decrypt_cb));
@@ -241,37 +240,6 @@ class MockDecryptor : public Decryptor {
DISALLOW_COPY_AND_ASSIGN(MockDecryptor);
};
-class MockDecryptorClient : public DecryptorClient {
- public:
- MockDecryptorClient();
- virtual ~MockDecryptorClient();
-
- MOCK_METHOD2(KeyAdded, void(const std::string&, const std::string&));
- MOCK_METHOD4(KeyError, void(const std::string&, const std::string&,
- Decryptor::KeyError, int));
- MOCK_METHOD4(KeyMessage, void(const std::string& key_system,
- const std::string& session_id,
- const std::string& message,
- const std::string& default_url));
- // TODO(xhwang): This is a workaround of the issue that move-only parameters
- // are not supported in mocked methods. Remove this when the issue is fixed
- // (http://code.google.com/p/googletest/issues/detail?id=395) or when we use
- // std::string instead of scoped_array<uint8> (http://crbug.com/130689).
- MOCK_METHOD5(NeedKeyMock, void(const std::string& key_system,
- const std::string& session_id,
- const std::string& type,
- const uint8* init_data,
- int init_data_length));
- virtual void NeedKey(const std::string& key_system,
- const std::string& session_id,
- const std::string& type,
- scoped_array<uint8> init_data,
- int init_data_length) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockDecryptorClient);
-};
-
// FilterFactory that returns canned instances of mock filters. You can set
// expectations on the filters and then pass the collection into a pipeline.
class MockFilterCollection {

Powered by Google App Engine
This is Rietveld 408576698