summaryrefslogtreecommitdiffstats
path: root/media/video/mock_video_decode_accelerator.cc
blob: a1a9a2b1457ae7541679808c32244f9e95becc0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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.

#include "media/video/mock_video_decode_accelerator.h"

namespace media {

using ::testing::Invoke;

MockVideoDecodeAccelerator::MockVideoDecodeAccelerator() {
  // Delete |this| when Destroy() is called.
  ON_CALL(*this, Destroy())
      .WillByDefault(Invoke(this, &MockVideoDecodeAccelerator::DeleteThis));
}

MockVideoDecodeAccelerator::~MockVideoDecodeAccelerator() {}

void MockVideoDecodeAccelerator::DeleteThis() { delete this; }

}  // namespace media