| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 ASH_MEDIA_DELEGATE_H_ | 5 #ifndef ASH_MEDIA_DELEGATE_H_ |
| 6 #define ASH_MEDIA_DELEGATE_H_ | 6 #define ASH_MEDIA_DELEGATE_H_ |
| 7 | 7 |
| 8 namespace content { |
| 9 class BrowserContext; |
| 10 } |
| 11 |
| 8 namespace ash { | 12 namespace ash { |
| 9 | 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 |
| 10 // A delegate class to control media playback. | 21 // A delegate class to control media playback. |
| 11 class MediaDelegate { | 22 class MediaDelegate { |
| 12 public: | 23 public: |
| 13 virtual ~MediaDelegate() {} | 24 virtual ~MediaDelegate() {} |
| 14 | 25 |
| 15 // Handles the Next Track Media shortcut key. | 26 // Handles the Next Track Media shortcut key. |
| 16 virtual void HandleMediaNextTrack() = 0; | 27 virtual void HandleMediaNextTrack() = 0; |
| 17 | 28 |
| 18 // Handles the Play/Pause Toggle Media shortcut key. | 29 // Handles the Play/Pause Toggle Media shortcut key. |
| 19 virtual void HandleMediaPlayPause() = 0; | 30 virtual void HandleMediaPlayPause() = 0; |
| 20 | 31 |
| 21 // Handles the Previous Track Media shortcut key. | 32 // Handles the Previous Track Media shortcut key. |
| 22 virtual void HandleMediaPrevTrack() = 0; | 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; |
| 23 }; | 39 }; |
| 24 | 40 |
| 25 } // namespace ash | 41 } // namespace ash |
| 26 | 42 |
| 27 #endif // ASH_MEDIA_DELEGATE_H_ | 43 #endif // ASH_MEDIA_DELEGATE_H_ |
| OLD | NEW |