Initial TouchBar Magic

* Make the AtomNSWindow also a NSTouchbarDelegate
* Implement basic makeTouchBar and makeItemForIdentifier methods
* Initial sending of touch / update events through IPC to BrowserWindowObjects

TODO:
* JS API
* JS Object Converters
* Generalize methods so that popovers can work
This commit is contained in:
Samuel Attard 2016-11-27 16:57:01 +11:00 committed by Kevin Sawicki
parent e027f4aacf
commit 703b5738c8
7 changed files with 105 additions and 0 deletions

View file

@ -340,6 +340,9 @@ void NativeWindow::SetAutoHideCursor(bool auto_hide) {
void NativeWindow::SetVibrancy(const std::string& filename) {
}
void NativeWindow::InitTouchBar() {
}
void NativeWindow::FocusOnWebView() {
web_contents()->GetRenderViewHost()->GetWidget()->Focus();
}
@ -565,6 +568,13 @@ void NativeWindow::NotifyWindowExecuteWindowsCommand(
observer.OnExecuteWindowsCommand(command);
}
void NativeWindow::NotifyTouchBarItemInteraction(
const std::string& type,
const std::string& item_id) {
FOR_EACH_OBSERVER(NativeWindowObserver, observers_,
OnTouchBarItemResult(type, item_id));
}
#if defined(OS_WIN)
void NativeWindow::NotifyWindowMessage(
UINT message, WPARAM w_param, LPARAM l_param) {