1 // Copyright 2016 The Chromium Embedded Framework Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be found 3 // in the LICENSE file. 4 5 #ifndef CEF_LIBCEF_BROWSER_BROWSER_UTIL_H_ 6 #define CEF_LIBCEF_BROWSER_BROWSER_UTIL_H_ 7 #pragma once 8 9 #include "include/internal/cef_types_wrappers.h" 10 11 namespace content { 12 struct NativeWebKeyboardEvent; 13 } 14 15 namespace ui { 16 class KeyEvent; 17 } 18 19 namespace browser_util { 20 21 // Convert a content::NativeWebKeyboardEvent to a CefKeyEvent. 22 bool GetCefKeyEvent(const content::NativeWebKeyboardEvent& event, 23 CefKeyEvent& cef_event); 24 25 // Convert a ui::KeyEvent to a CefKeyEvent. 26 bool GetCefKeyEvent(const ui::KeyEvent& event, CefKeyEvent& cef_event); 27 28 } // namespace browser_util 29 30 #endif // CEF_LIBCEF_BROWSER_BROWSER_UTIL_H_ 31