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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
915 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.
#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_
#define ELECTRON_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;
// disable copy
MenuModelAdapter(const MenuModelAdapter&) = delete;
MenuModelAdapter& operator=(const MenuModelAdapter&) = delete;
protected:
bool GetAccelerator(int id, ui::Accelerator* accelerator) const override;
private:
ElectronMenuModel* menu_model_;
};
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_