chromium/ui/views/dialog_model_context_menu_controller.h

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

#ifndef UI_VIEWS_DIALOG_MODEL_CONTEXT_MENU_CONTROLLER_H_
#define UI_VIEWS_DIALOG_MODEL_CONTEXT_MENU_CONTROLLER_H_

#include <memory>

#include "base/memory/raw_ptr.h"
#include "ui/base/models/dialog_model_menu_model_adapter.h"
#include "ui/views/context_menu_controller.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/views_export.h"

namespace views {

class View;

// A ContextMenuController that makes it easier to host context menus using
// ui::DialogModel. The constructor registers `this` as the context-menu
// controller of the `host` View.
class VIEWS_EXPORT DialogModelContextMenuController final
    : public ContextMenuController {};

}  // namespace views

#endif  // UI_VIEWS_DIALOG_MODEL_CONTEXT_MENU_CONTROLLER_H_