chromium/chrome/browser/ui/views/frame/dbus_appmenu.h

// Copyright 2013 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_FRAME_DBUS_APPMENU_H_
#define CHROME_BROWSER_UI_VIEWS_FRAME_DBUS_APPMENU_H_

#include <map>
#include <string>

#include "base/containers/flat_set.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observation.h"
#include "chrome/browser/command_observer.h"
#include "chrome/browser/profiles/avatar_menu.h"
#include "chrome/browser/profiles/avatar_menu_observer.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "components/dbus/menu/menu.h"
#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/top_sites.h"
#include "components/history/core/browser/top_sites_observer.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/sessions/core/tab_restore_service.h"
#include "components/sessions/core/tab_restore_service_observer.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/models/simple_menu_model.h"

namespace ui {
class Accelerator;
}

class Browser;
class BrowserView;
struct DbusAppmenuCommand;
class Profile;

// Controls the Mac style menu bar on Linux desktop environments.
//
// Unity had a MacOS-like menu bar at the top of the screen that changed
// depending on the active window.  Unity has been discontinued but the menu
// survived and is usually referred to as DBus AppMenu.  There is support for it
// in KDE Plasma in form of a widget that can be inserted into a panel.
class DbusAppmenu : public AvatarMenuObserver,
                    public BrowserListObserver,
                    public CommandObserver,
                    public history::TopSitesObserver,
                    public sessions::TabRestoreServiceObserver,
                    public ui::SimpleMenuModel::Delegate {};

#endif  // CHROME_BROWSER_UI_VIEWS_FRAME_DBUS_APPMENU_H_