summaryrefslogtreecommitdiff
path: root/chromium/content/browser/renderer_host/media/mock_media_observer.h
blob: c3543f3002b629a2ede11cdd553efe64fe8b40ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2012 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_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_
#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_

#include <string>

#include "base/basictypes.h"
#include "content/public/browser/media_observer.h"
#include "media/audio/audio_parameters.h"
#include "media/base/media_log_event.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace content {

class MockMediaObserver : public MediaObserver {
 public:
  MockMediaObserver();
  virtual ~MockMediaObserver();

  MOCK_METHOD1(OnAudioCaptureDevicesChanged,
               void(const MediaStreamDevices& devices));
  MOCK_METHOD1(OnVideoCaptureDevicesChanged,
                 void(const MediaStreamDevices& devices));
  MOCK_METHOD5(OnMediaRequestStateChanged,
               void(int render_process_id, int render_view_id,
                    int page_request_id,
                    const MediaStreamDevice& device,
                    const MediaRequestState state));
  MOCK_METHOD6(OnAudioStreamPlayingChanged,
               void(int render_process_id,
                    int render_view_id,
                    int stream_id,
                    bool is_playing,
                    float power_dbfs,
                    bool clipped));
};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MOCK_MEDIA_OBSERVER_H_