use std::io;
use super::super::super::window::{GlobalHotkey, HotkeyId};
use super::error::closed_error;
use super::view::WebViewHost;
impl WebViewHost {
pub fn register_hotkey(&mut self, id: HotkeyId, hotkey: GlobalHotkey) -> io::Result<()> {
if self.closed {
return Err(closed_error());
}
self.window.register_hotkey(id, hotkey)
}
pub fn unregister_hotkey(&mut self, id: HotkeyId) -> io::Result<bool> {
self.window.unregister_hotkey(id)
}
pub fn take_hotkey_presses(&mut self) -> Vec<HotkeyId> {
self.window.take_hotkey_presses()
}
}