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 { ...@@ -91,7 +91,7 @@ class AudioFocusManager::SourceObserverHolder {
void AudioFocusManager::RequestAudioFocus( void AudioFocusManager::RequestAudioFocus(
mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver, mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver,
mojo::PendingRemote<mojom::MediaSession> media_session, mojo::PendingRemote<mojom::MediaSession> session,
mojom::MediaSessionInfoPtr session_info, mojom::MediaSessionInfoPtr session_info,
mojom::AudioFocusType type, mojom::AudioFocusType type,
RequestAudioFocusCallback callback) { RequestAudioFocusCallback callback) {
...@@ -100,7 +100,7 @@ void AudioFocusManager::RequestAudioFocus( ...@@ -100,7 +100,7 @@ void AudioFocusManager::RequestAudioFocus(
RequestAudioFocusInternal( RequestAudioFocusInternal(
std::make_unique<AudioFocusRequest>( std::make_unique<AudioFocusRequest>(
weak_ptr_factory_.GetWeakPtr(), std::move(receiver), 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(), GetBindingSourceName(), base::UnguessableToken::Create(),
GetBindingIdentity()), GetBindingIdentity()),
type); type);
...@@ -111,7 +111,7 @@ void AudioFocusManager::RequestAudioFocus( ...@@ -111,7 +111,7 @@ void AudioFocusManager::RequestAudioFocus(
void AudioFocusManager::RequestGroupedAudioFocus( void AudioFocusManager::RequestGroupedAudioFocus(
const base::UnguessableToken& request_id, const base::UnguessableToken& request_id,
mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver, mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver,
mojo::PendingRemote<mojom::MediaSession> media_session, mojo::PendingRemote<mojom::MediaSession> session,
mojom::MediaSessionInfoPtr session_info, mojom::MediaSessionInfoPtr session_info,
mojom::AudioFocusType type, mojom::AudioFocusType type,
const base::UnguessableToken& group_id, const base::UnguessableToken& group_id,
...@@ -124,7 +124,7 @@ void AudioFocusManager::RequestGroupedAudioFocus( ...@@ -124,7 +124,7 @@ void AudioFocusManager::RequestGroupedAudioFocus(
RequestAudioFocusInternal( RequestAudioFocusInternal(
std::make_unique<AudioFocusRequest>( std::make_unique<AudioFocusRequest>(
weak_ptr_factory_.GetWeakPtr(), std::move(receiver), 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()), GetBindingSourceName(), group_id, GetBindingIdentity()),
type); type);
......
...@@ -52,14 +52,14 @@ class AudioFocusManager : public mojom::AudioFocusManager, ...@@ -52,14 +52,14 @@ class AudioFocusManager : public mojom::AudioFocusManager,
// mojom::AudioFocusManager. // mojom::AudioFocusManager.
void RequestAudioFocus( void RequestAudioFocus(
mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver, mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver,
mojo::PendingRemote<mojom::MediaSession> media_session, mojo::PendingRemote<mojom::MediaSession> session,
mojom::MediaSessionInfoPtr session_info, mojom::MediaSessionInfoPtr session_info,
mojom::AudioFocusType type, mojom::AudioFocusType type,
RequestAudioFocusCallback callback) override; RequestAudioFocusCallback callback) override;
void RequestGroupedAudioFocus( void RequestGroupedAudioFocus(
const base::UnguessableToken& request_id, const base::UnguessableToken& request_id,
mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver, mojo::PendingReceiver<mojom::AudioFocusRequestClient> receiver,
mojo::PendingRemote<mojom::MediaSession> media_session, mojo::PendingRemote<mojom::MediaSession> session,
mojom::MediaSessionInfoPtr session_info, mojom::MediaSessionInfoPtr session_info,
mojom::AudioFocusType type, mojom::AudioFocusType type,
const base::UnguessableToken& group_id, const base::UnguessableToken& group_id,
......
...@@ -93,28 +93,28 @@ interface AudioFocusRequestClient { ...@@ -93,28 +93,28 @@ interface AudioFocusRequestClient {
// Next Method ID: 9 // Next Method ID: 9
// Deprecated method IDs: 3 // Deprecated method IDs: 3
interface AudioFocusManager { interface AudioFocusManager {
// Requests audio focus with |type| for the |media_session| with // Requests audio focus with |type| for the |session| with |session_info|.
// |session_info|. Media sessions should provide a |request| that will // Media sessions should provide a |request| that will provide an
// provide an AudioFocusRequestClient that can be used to control this // AudioFocusRequestClient that can be used to control this request. The
// request. The callback will resolve with the id of the request when // callback will resolve with the id of the request when audio focus has been
// audio focus has been granted. // granted.
RequestAudioFocus@0(pending_receiver<AudioFocusRequestClient> client, RequestAudioFocus@0(pending_receiver<AudioFocusRequestClient> client,
pending_remote<MediaSession> media_session, pending_remote<MediaSession> session,
MediaSessionInfo session_info, MediaSessionInfo session_info,
AudioFocusType type) => AudioFocusType type) =>
(mojo_base.mojom.UnguessableToken request_id); (mojo_base.mojom.UnguessableToken request_id);
// Requests audio focus with |type| for the |media_session| with // Requests audio focus with |type| for the |session| with |session_info|.
// |session_info|. Media sessions should provide a |request| that will // Media sessions should provide a |request| that will provide an
// provide an AudioFocusRequestClient that can be used to control this // AudioFocusRequestClient that can be used to control this request.
// request. |request_id| should be generated by the client and should be // |request_id| should be generated by the client and should be unique. If it
// unique. If it is not valid then the request will fail. |group_id| is // is not valid then the request will fail. |group_id| is used for grouping
// used for grouping sessions together. This is when a group of sessions // sessions together. This is when a group of sessions will share audio focus.
// will share audio focus. Returns whether the request succeeded. // Returns whether the request succeeded.
[MinVersion=4] RequestGroupedAudioFocus@4( [MinVersion=4] RequestGroupedAudioFocus@4(
mojo_base.mojom.UnguessableToken request_id, mojo_base.mojom.UnguessableToken request_id,
pending_receiver<AudioFocusRequestClient> client, pending_receiver<AudioFocusRequestClient> client,
pending_remote<MediaSession> media_session, pending_remote<MediaSession> session,
MediaSessionInfo session_info, MediaSessionInfo session_info,
AudioFocusType type, AudioFocusType type,
mojo_base.mojom.UnguessableToken group_id) => (bool success); 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