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

Unified Diff: content/shell/renderer/test_runner/mock_web_media_stream_center.h

Issue 418303002: test_runner: Migrate MockWebMediaStreamCenter to Chromium C++ style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing mac build error Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/renderer/test_runner/mock_web_media_stream_center.h
diff --git a/content/shell/renderer/test_runner/mock_web_media_stream_center.h b/content/shell/renderer/test_runner/mock_web_media_stream_center.h
new file mode 100644
index 0000000000000000000000000000000000000000..46067a2055c4249cd13c8eea96111c6f6596f374
--- /dev/null
+++ b/content/shell/renderer/test_runner/mock_web_media_stream_center.h
@@ -0,0 +1,59 @@
+// Copyright 2013 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_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MEDIA_STREAM_CENTER_H_
+#define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MEDIA_STREAM_CENTER_H_
+
+#include "third_party/WebKit/public/platform/WebMediaStreamCenter.h"
+
+#include "base/basictypes.h"
+#include "content/shell/renderer/test_runner/TestCommon.h"
+#include "content/shell/renderer/test_runner/WebTask.h"
+
+namespace blink {
+class WebAudioSourceProvider;
+class WebMediaStreamCenterClient;
+};
+
+namespace content {
+
+class TestInterfaces;
+
+class MockWebMediaStreamCenter : public blink::WebMediaStreamCenter {
+ public:
+ MockWebMediaStreamCenter(blink::WebMediaStreamCenterClient* client,
+ TestInterfaces* interfaces);
+ virtual ~MockWebMediaStreamCenter();
+
+ virtual bool getMediaStreamTrackSources(
+ const blink::WebMediaStreamTrackSourcesRequest& request);
+ virtual void didEnableMediaStreamTrack(
+ const blink::WebMediaStreamTrack& track);
+ virtual void didDisableMediaStreamTrack(
+ const blink::WebMediaStreamTrack& track);
+ virtual bool didAddMediaStreamTrack(const blink::WebMediaStream& stream,
+ const blink::WebMediaStreamTrack& track);
+ virtual bool didRemoveMediaStreamTrack(
+ const blink::WebMediaStream& stream,
+ const blink::WebMediaStreamTrack& track);
+ virtual void didStopLocalMediaStream(const blink::WebMediaStream& stream);
+ virtual bool didStopMediaStreamTrack(const blink::WebMediaStreamTrack& track);
+ virtual void didCreateMediaStream(blink::WebMediaStream& stream);
+ virtual blink::WebAudioSourceProvider*
+ createWebAudioSourceFromMediaStreamTrack(
+ const blink::WebMediaStreamTrack& track);
+
+ // Task related methods
+ WebTaskList* mutable_task_list() { return &task_list_; }
+
+ private:
+ WebTaskList task_list_;
+ TestInterfaces* interfaces_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockWebMediaStreamCenter);
+};
+
+} // namespace content
+
+#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MEDIA_STREAM_CENTER_H_

Powered by Google App Engine
This is Rietveld 408576698