chromium/chrome/browser/ui/global_media_controls/supplemental_device_picker_producer.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_GLOBAL_MEDIA_CONTROLS_SUPPLEMENTAL_DEVICE_PICKER_PRODUCER_H_
#define CHROME_BROWSER_UI_GLOBAL_MEDIA_CONTROLS_SUPPLEMENTAL_DEVICE_PICKER_PRODUCER_H_

#include <memory>
#include <optional>
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/global_media_controls/supplemental_device_picker_item.h"
#include "components/global_media_controls/public/media_item_manager_observer.h"
#include "components/global_media_controls/public/media_item_producer.h"
#include "components/global_media_controls/public/media_item_ui_observer.h"
#include "components/global_media_controls/public/media_item_ui_observer_set.h"
#include "components/global_media_controls/public/mojom/device_service.mojom.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/bindings/remote_set.h"

namespace global_media_controls {
class MediaItemManager;
}  // namespace global_media_controls

// This object creates and manages media dialog items (represented by
// SupplementalDevicePicker) that contain device pickers not associated with any
// active media. Such an item becomes necessary e.g. when wanting to
// present/cast from a web page with no active media.
//
// This object is not the only producer of items containing device pickers.
// MediaSessionItemProducer produces items containing pickers for active media.
//
// On Chrome OS, this object lives on the Ash side of the Ash-Lacros split.
class SupplementalDevicePickerProducer final
    : public global_media_controls::MediaItemProducer,
      public global_media_controls::MediaItemManagerObserver,
      public global_media_controls::MediaItemUIObserver,
      public global_media_controls::mojom::DevicePickerProvider {};

#endif  // CHROME_BROWSER_UI_GLOBAL_MEDIA_CONTROLS_SUPPLEMENTAL_DEVICE_PICKER_PRODUCER_H_