OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 CONTENT_PUBLIC_BROWSER_ANDROID_MEDIA_CONTROLS_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_MEDIA_CONTROLS_DELEGATE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "content/common/content_export.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 // Provides the necessary information to media controls and gets notified about |
| 14 // the media controls events. |
| 15 class CONTENT_EXPORT MediaControlsDelegate { |
| 16 public: |
| 17 // Called when the user interacts with the Pause control (e.g. taps on a |
| 18 // button). |
| 19 virtual void OnControlsPause() = 0; |
| 20 |
| 21 // Called when the user interacts with the Play control (e.g. taps on a |
| 22 // button). |
| 23 virtual void OnControlsResume() = 0; |
| 24 |
| 25 // Indicates if the media controls are allowed to affect the state of the |
| 26 // delegate. If returns false, controls should be hidden/disabled. |
| 27 virtual bool IsControllable() = 0; |
| 28 |
| 29 // Indicates if the controls should be in the paused state or not. |
| 30 virtual bool IsPaused() = 0; |
| 31 |
| 32 protected: |
| 33 MediaControlsDelegate() = default; |
| 34 virtual ~MediaControlsDelegate() = default; |
| 35 |
| 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(MediaControlsDelegate); |
| 38 }; |
| 39 |
| 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_MEDIA_CONTROLS_DELEGATE_H_ |
OLD | NEW |