OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "content/browser/media/media_internals.h" | |
12 #include "content/public/browser/media_observer.h" | 11 #include "content/public/browser/media_observer.h" |
13 #include "media/audio/audio_parameters.h" | 12 #include "media/audio/audio_parameters.h" |
14 #include "media/base/media_log_event.h" | 13 #include "media/base/media_log_event.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
16 | 15 |
17 namespace content { | 16 namespace content { |
18 | 17 |
19 class MockMediaObserver : public MediaObserver { | 18 class MockMediaObserver : public MediaObserver { |
20 public: | 19 public: |
21 MockMediaObserver(); | 20 MockMediaObserver(); |
(...skipping 10 matching lines...) Expand all Loading... |
32 const MediaRequestState state)); | 31 const MediaRequestState state)); |
33 MOCK_METHOD6(OnAudioStreamPlayingChanged, | 32 MOCK_METHOD6(OnAudioStreamPlayingChanged, |
34 void(int render_process_id, | 33 void(int render_process_id, |
35 int render_view_id, | 34 int render_view_id, |
36 int stream_id, | 35 int stream_id, |
37 bool is_playing, | 36 bool is_playing, |
38 float power_dbfs, | 37 float power_dbfs, |
39 bool clipped)); | 38 bool clipped)); |
40 }; | 39 }; |
41 | 40 |
42 class MockMediaInternals : public MediaInternals { | |
43 public: | |
44 MockMediaInternals(); | |
45 virtual ~MockMediaInternals(); | |
46 | |
47 MOCK_METHOD2(OnDeleteAudioStream, | |
48 void(void* host, int stream_id)); | |
49 MOCK_METHOD3(OnSetAudioStreamPlaying, | |
50 void(void* host, int stream_id, bool playing)); | |
51 MOCK_METHOD4(OnAudioStreamCreated, | |
52 void(void* host, int stream_id, | |
53 const media::AudioParameters& params, | |
54 const std::string& input_device_id)); | |
55 MOCK_METHOD3(OnSetAudioStreamStatus, | |
56 void(void* host, int stream_id, const std::string& status)); | |
57 MOCK_METHOD3(OnSetAudioStreamVolume, | |
58 void(void* host, int stream_id, double volume)); | |
59 MOCK_METHOD2(OnMediaEvent, | |
60 void(int source, const media::MediaLogEvent& event)); | |
61 }; | |
62 | |
63 } // namespace content | 41 } // namespace content |
64 | 42 |
65 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_ | 43 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_ |
OLD | NEW |