summaryrefslogtreecommitdiffstats
path: root/ash/media_delegate.h
blob: 4ea9a17a04807993c9bf5b566772e45242d42155 (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 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 ASH_MEDIA_DELEGATE_H_
#define ASH_MEDIA_DELEGATE_H_

namespace content {
class BrowserContext;
}

namespace ash {

enum MediaCaptureState {
  MEDIA_CAPTURE_NONE = 0,
  MEDIA_CAPTURE_AUDIO = 1 << 0,
  MEDIA_CAPTURE_VIDEO = 1 << 1,
  MEDIA_CAPTURE_AUDIO_VIDEO = MEDIA_CAPTURE_AUDIO | MEDIA_CAPTURE_VIDEO,
};

// A delegate class to control media playback.
class MediaDelegate {
 public:
  virtual ~MediaDelegate() {}

  // Handles the Next Track Media shortcut key.
  virtual void HandleMediaNextTrack() = 0;

  // Handles the Play/Pause Toggle Media shortcut key.
  virtual void HandleMediaPlayPause() = 0;

  // Handles the Previous Track Media shortcut key.
  virtual void HandleMediaPrevTrack() = 0;

  // Returns the current media recording state of web contents
  // that belongs to the |context|.
  virtual MediaCaptureState GetMediaCaptureState(
      content::BrowserContext* context) = 0;
};

}  // namespace ash

#endif  // ASH_MEDIA_DELEGATE_H_