Home | History | Annotate | Download | only in ash
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef ASH_MEDIA_DELEGATE_H_
      6 #define ASH_MEDIA_DELEGATE_H_
      7 
      8 namespace content {
      9 class BrowserContext;
     10 }
     11 
     12 namespace ash {
     13 
     14 enum MediaCaptureState {
     15   MEDIA_CAPTURE_NONE = 0,
     16   MEDIA_CAPTURE_AUDIO = 1 << 0,
     17   MEDIA_CAPTURE_VIDEO = 1 << 1,
     18   MEDIA_CAPTURE_AUDIO_VIDEO = MEDIA_CAPTURE_AUDIO | MEDIA_CAPTURE_VIDEO,
     19 };
     20 
     21 // A delegate class to control media playback.
     22 class MediaDelegate {
     23  public:
     24   virtual ~MediaDelegate() {}
     25 
     26   // Handles the Next Track Media shortcut key.
     27   virtual void HandleMediaNextTrack() = 0;
     28 
     29   // Handles the Play/Pause Toggle Media shortcut key.
     30   virtual void HandleMediaPlayPause() = 0;
     31 
     32   // Handles the Previous Track Media shortcut key.
     33   virtual void HandleMediaPrevTrack() = 0;
     34 
     35   // Returns the current media recording state of web contents
     36   // that belongs to the |context|.
     37   virtual MediaCaptureState GetMediaCaptureState(
     38       content::BrowserContext* context) = 0;
     39 };
     40 
     41 }  // namespace ash
     42 
     43 #endif  // ASH_MEDIA_DELEGATE_H_
     44