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

Unified Diff: content/test/mock_audio_stream_registry.h

Issue 2578983003: Add AudioStreamRegistry. Move stream counting logic (Closed)
Patch Set: Add missing EXPECT_TRUE. Created 4 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: content/test/mock_audio_stream_registry.h
diff --git a/content/test/mock_audio_stream_registry.h b/content/test/mock_audio_stream_registry.h
new file mode 100644
index 0000000000000000000000000000000000000000..8f3ce825182bf029daba9885e38d118478dfc4f9
--- /dev/null
+++ b/content/test/mock_audio_stream_registry.h
@@ -0,0 +1,29 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_TEST_MOCK_AUDIO_STREAM_REGISTRY_H_
+#define CONTENT_TEST_MOCK_AUDIO_STREAM_REGISTRY_H_
+
+#include "content/browser/renderer_host/media/audio_stream_registry.h"
+#include "content/browser/renderer_host/media/audio_stream_registry_impl.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace content {
+
+class MockAudioStreamRegistry : public AudioStreamRegistry {
+ public:
+ explicit MockAudioStreamRegistry(int render_process_id);
+ ~MockAudioStreamRegistry() override;
+
+ MOCK_METHOD1(RegisterOutputStream, void(Stream* stream));
+ MOCK_METHOD1(DeregisterOutputStream, void(Stream* stream));
+ MOCK_METHOD2(OutputStreamStateChanged, void(Stream* stream, bool playing));
+
+ private:
+ AudioStreamRegistryImpl impl_;
+};
+
+} // namespace content
+
+#endif // CONTENT_TEST_MOCK_AUDIO_STREAM_REGISTRY_H_

Powered by Google App Engine
This is Rietveld 408576698