chromium/chrome/browser/ui/toolbar/app_menu_model.h

// Copyright 2012 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_TOOLBAR_APP_MENU_MODEL_H_
#define CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_

#include <memory>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/timer/elapsed_timer.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/safety_hub/safety_hub_constants.h"
#include "components/prefs/pref_change_registrar.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/models/button_menu_item_model.h"
#include "ui/base/models/simple_menu_model.h"

class AppMenuIconController;
class BookmarkSubMenuModel;
class Browser;
class ChromeLabsModel;

// Values should correspond to 'WrenchMenuAction' enum in enums.xml.
//
// LINT.IfChange(AppMenuAction)
enum AppMenuAction {};
// LINT.ThenChange(/tools/metrics/histograms/enums.xml:WrenchMenuAction)

enum class AlertMenuItem {};

// Function to record WrenchMenu.MenuAction histogram
void LogWrenchMenuAction(AppMenuAction action_id);

// Given the menu model and command_id, set the icon to the given vector-icon.
// This is a no-op if the command is unavailable.
void SetCommandIcon(ui::SimpleMenuModel* model,
                    int command_id,
                    const gfx::VectorIcon& vector_icon);

class ToolsMenuModel : public ui::SimpleMenuModel {};

class ExtensionsMenuModel : public ui::SimpleMenuModel {};

// A menu model that builds the contents of the app menu.
class AppMenuModel : public ui::SimpleMenuModel,
                     public ui::SimpleMenuModel::Delegate,
                     public ui::ButtonMenuItemModel::Delegate {};

#endif  // CHROME_BROWSER_UI_TOOLBAR_APP_MENU_MODEL_H_