feat: support global shortcuts via GlobalShortcutsPortal
feature with ozone/wayland (#45297)
This commit is contained in:
parent
4417f74a5b
commit
18007f843e
7 changed files with 591 additions and 9 deletions
|
@ -43,6 +43,7 @@ class GlobalShortcut final : private ui::GlobalAcceleratorListener::Observer,
|
|||
private:
|
||||
typedef std::map<ui::Accelerator, base::RepeatingClosure>
|
||||
AcceleratorCallbackMap;
|
||||
typedef std::map<std::string, base::RepeatingClosure> CommandCallbackMap;
|
||||
|
||||
bool RegisterAll(const std::vector<ui::Accelerator>& accelerators,
|
||||
const base::RepeatingClosure& callback);
|
||||
|
@ -59,6 +60,7 @@ class GlobalShortcut final : private ui::GlobalAcceleratorListener::Observer,
|
|||
const std::string& command_id) override;
|
||||
|
||||
AcceleratorCallbackMap accelerator_callback_map_;
|
||||
CommandCallbackMap command_callback_map_;
|
||||
};
|
||||
|
||||
} // namespace electron::api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue