electron/shell/browser/ui/views/menu_model_adapter.h

30 lines
797 B
C
Raw Normal View History

// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
2019-06-19 20:56:58 +00:00
#ifndef SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_
#define SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_
#include "shell/browser/ui/electron_menu_model.h"
#include "ui/views/controls/menu/menu_model_adapter.h"
namespace electron {
class MenuModelAdapter : public views::MenuModelAdapter {
public:
explicit MenuModelAdapter(ElectronMenuModel* menu_model);
2018-05-03 14:04:22 +00:00
~MenuModelAdapter() override;
protected:
bool GetAccelerator(int id, ui::Accelerator* accelerator) const override;
private:
ElectronMenuModel* menu_model_;
DISALLOW_COPY_AND_ASSIGN(MenuModelAdapter);
};
} // namespace electron
2019-06-19 20:56:58 +00:00
#endif // SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_