chromium/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.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_VIEWS_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_SIDE_PANEL_CONTROLLER_H_
#define CHROME_BROWSER_UI_VIEWS_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_SIDE_PANEL_CONTROLLER_H_

#include <vector>

#include "base/callback_list.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "chrome/browser/ui/tabs/public/tab_interface.h"
#include "chrome/browser/ui/views/side_panel/side_panel_entry_observer.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"

class SidePanelRegistry;

namespace content {
class WebContents;
}  // namespace content

namespace views {
class View;
}  // namespace views

class ReadAnythingSidePanelController;
class ReadAnythingSidePanelWebView;
class ReadAnythingUntrustedPageHandler;

// Conceptually, if the side panel is open, then ReadAnythingSidePanelController
// owns the WebContents (even though this is not the case in practice). The
// WebUIController created for the WebContents needs to be able to reference the
// ReadAnythingSidePanelController. This class allows this to happen.
class ReadAnythingSidePanelControllerGlue
    : public content::WebContentsUserData<ReadAnythingSidePanelControllerGlue> {};

// A per-tab class that facilitates the showing of the Read Anything side panel.
class ReadAnythingSidePanelController : public SidePanelEntryObserver,
                                        public content::WebContentsObserver {};

#endif  // CHROME_BROWSER_UI_VIEWS_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_SIDE_PANEL_CONTROLLER_H_