| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_PUBLIC_BROWSER_MEDIA_SESSION_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_MEDIA_SESSION_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_MEDIA_SESSION_H_ | 6 #define CONTENT_PUBLIC_BROWSER_MEDIA_SESSION_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // |type| represents the origin of the request. | 48 // |type| represents the origin of the request. |
| 49 virtual void Suspend(SuspendType suspend_type) = 0; | 49 virtual void Suspend(SuspendType suspend_type) = 0; |
| 50 | 50 |
| 51 // Resume the media session. | 51 // Resume the media session. |
| 52 // |type| represents the origin of the request. | 52 // |type| represents the origin of the request. |
| 53 virtual void Stop(SuspendType suspend_type) = 0; | 53 virtual void Stop(SuspendType suspend_type) = 0; |
| 54 | 54 |
| 55 // Tell the media session a user action has performed. | 55 // Tell the media session a user action has performed. |
| 56 virtual void DidReceiveAction(blink::mojom::MediaSessionAction action) = 0; | 56 virtual void DidReceiveAction(blink::mojom::MediaSessionAction action) = 0; |
| 57 | 57 |
| 58 // Let the media session start ducking such that the volume multiplier is |
| 59 // reduced. |
| 60 virtual void StartDucking() = 0; |
| 61 |
| 62 // Let the media session stop ducking such that the volume multiplier is |
| 63 // recovered. |
| 64 virtual void StopDucking() = 0; |
| 65 |
| 58 protected: | 66 protected: |
| 59 MediaSession() = default; | 67 MediaSession() = default; |
| 60 }; | 68 }; |
| 61 | 69 |
| 62 } // namespace content | 70 } // namespace content |
| 63 | 71 |
| 64 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_SESSION_H_ | 72 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_SESSION_H_ |
| OLD | NEW |