| Index: content/public/browser/android/media_controls_delegate.h
|
| diff --git a/content/public/browser/android/media_controls_delegate.h b/content/public/browser/android/media_controls_delegate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bc8c2136da59cb2ee03b47b9102282b0d234a508
|
| --- /dev/null
|
| +++ b/content/public/browser/android/media_controls_delegate.h
|
| @@ -0,0 +1,42 @@
|
| +// Copyright 2015 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 CONTENT_PUBLIC_BROWSER_ANDROID_MEDIA_CONTROLS_DELEGATE_H_
|
| +#define CONTENT_PUBLIC_BROWSER_ANDROID_MEDIA_CONTROLS_DELEGATE_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "content/common/content_export.h"
|
| +
|
| +namespace content {
|
| +
|
| +// Provides the necessary information to media controls and gets notified about
|
| +// the media controls events.
|
| +class CONTENT_EXPORT MediaControlsDelegate {
|
| + public:
|
| + // Called when the user interacts with the Pause control (e.g. taps on a
|
| + // button).
|
| + virtual void OnControlsPause() = 0;
|
| +
|
| + // Called when the user interacts with the Play control (e.g. taps on a
|
| + // button).
|
| + virtual void OnControlsResume() = 0;
|
| +
|
| + // Indicates if the media controls are allowed to affect the state of the
|
| + // delegate. If returns false, controls should be hidden/disabled.
|
| + virtual bool IsControllable() = 0;
|
| +
|
| + // Indicates if the controls should be in the paused state or not.
|
| + virtual bool IsPaused() = 0;
|
| +
|
| + protected:
|
| + MediaControlsDelegate() = default;
|
| + virtual ~MediaControlsDelegate() = default;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(MediaControlsDelegate);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_BROWSER_ANDROID_MEDIA_CONTROLS_DELEGATE_H_
|
|
|