Commit 43447321 authored by Wei Lee's avatar Wei Lee Committed by Commit Bot

[Audio Focus] Change parameter name to avoid name conflict

Since the parameter name conflicts with the name of namespace, it will
cause error when generating JS version of the mojo interface.

Bug: 1054370
Test: Build successfully and the conflict is gone
Change-Id: I8707c5170d104256b5f5caa751be279ccb3b4689
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2102369Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarBecca Hughes <beccahughes@chromium.org>
Commit-Queue: Wei Lee <wtlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751262}
parent 76559720
......@@ -91,7 +91,7 @@ class AudioFocusManager::SourceObserverHolder {
void AudioFocusManager::RequestAudioFocus(
mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver,
mojo::PendingRemote<mojom::MediaSession> media_session,
mojo::PendingRemote<mojom::MediaSession> session,
mojom::MediaSessionInfoPtr session_info,
mojom::AudioFocusType type,
RequestAudioFocusCallback callback) {
......@@ -100,7 +100,7 @@ void AudioFocusManager::RequestAudioFocus(
RequestAudioFocusInternal(
std::make_unique<AudioFocusRequest>(
weak_ptr_factory_.GetWeakPtr(), std::move(receiver),
std::move(media_session), std::move(session_info), type, request_id,
std::move(session), std::move(session_info), type, request_id,
GetBindingSourceName(), base::UnguessableToken::Create(),
GetBindingIdentity()),
type);
......@@ -111,7 +111,7 @@ void AudioFocusManager::RequestAudioFocus(
void AudioFocusManager::RequestGroupedAudioFocus(
const base::UnguessableToken& request_id,
mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver,
mojo::PendingRemote<mojom::MediaSession> media_session,
mojo::PendingRemote<mojom::MediaSession> session,
mojom::MediaSessionInfoPtr session_info,
mojom::AudioFocusType type,
const base::UnguessableToken& group_id,
......@@ -124,7 +124,7 @@ void AudioFocusManager::RequestGroupedAudioFocus(
RequestAudioFocusInternal(
std::make_unique<AudioFocusRequest>(
weak_ptr_factory_.GetWeakPtr(), std::move(receiver),
std::move(media_session), std::move(session_info), type, request_id,
std::move(session), std::move(session_info), type, request_id,
GetBindingSourceName(), group_id, GetBindingIdentity()),
type);
......
......@@ -52,14 +52,14 @@ class AudioFocusManager : public mojom::AudioFocusManager,
// mojom::AudioFocusManager.
void RequestAudioFocus(
mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver,
mojo::PendingRemote<mojom::MediaSession> media_session,
mojo::PendingRemote<mojom::MediaSession> session,
mojom::MediaSessionInfoPtr session_info,
mojom::AudioFocusType type,
RequestAudioFocusCallback callback) override;
void RequestGroupedAudioFocus(
const base::UnguessableToken& request_id,
mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver,
mojo::PendingRemote<mojom::MediaSession> media_session,
mojo::PendingRemote<mojom::MediaSession> session,
mojom::MediaSessionInfoPtr session_info,
mojom::AudioFocusType type,
const base::UnguessableToken& group_id,
......
......@@ -93,28 +93,28 @@ interface AudioFocusRequestClient {
// Next Method ID: 9
// Deprecated method IDs: 3
interface AudioFocusManager {
// Requests audio focus with |type| for the |media_session| with
// |session_info|. Media sessions should provide a |request| that will
// provide an AudioFocusRequestClient that can be used to control this
// request. The callback will resolve with the id of the request when
// audio focus has been granted.
// Requests audio focus with |type| for the |session| with |session_info|.
// Media sessions should provide a |request| that will provide an
// AudioFocusRequestClient that can be used to control this request. The
// callback will resolve with the id of the request when audio focus has been
// granted.
RequestAudioFocus@0(pending_receiver<AudioFocusRequestClient> client,
pending_remote<MediaSession> media_session,
pending_remote<MediaSession> session,
MediaSessionInfo session_info,
AudioFocusType type) =>
(mojo_base.mojom.UnguessableToken request_id);
// Requests audio focus with |type| for the |media_session| with
// |session_info|. Media sessions should provide a |request| that will
// provide an AudioFocusRequestClient that can be used to control this
// request. |request_id| should be generated by the client and should be
// unique. If it is not valid then the request will fail. |group_id| is
// used for grouping sessions together. This is when a group of sessions
// will share audio focus. Returns whether the request succeeded.
// Requests audio focus with |type| for the |session| with |session_info|.
// Media sessions should provide a |request| that will provide an
// AudioFocusRequestClient that can be used to control this request.
// |request_id| should be generated by the client and should be unique. If it
// is not valid then the request will fail. |group_id| is used for grouping
// sessions together. This is when a group of sessions will share audio focus.
// Returns whether the request succeeded.
[MinVersion=4] RequestGroupedAudioFocus@4(
mojo_base.mojom.UnguessableToken request_id,
pending_receiver<AudioFocusRequestClient> client,
pending_remote<MediaSession> media_session,
pending_remote<MediaSession> session,
MediaSessionInfo session_info,
AudioFocusType type,
mojo_base.mojom.UnguessableToken group_id) => (bool success);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment