1 // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that can 3 // be found in the LICENSE file. 4 5 #ifndef CEF_LIBCEF_BROWSER_NATIVE_MENU_RUNNER_MAC_H_ 6 #define CEF_LIBCEF_BROWSER_NATIVE_MENU_RUNNER_MAC_H_ 7 #pragma once 8 9 #include "libcef/browser/menu_runner.h" 10 11 #include "base/mac/scoped_nsobject.h" 12 13 #if __OBJC__ 14 @class MenuControllerCocoa; 15 #else 16 class MenuControllerCocoa; 17 #endif 18 19 class CefMenuRunnerMac : public CefMenuRunner { 20 public: 21 CefMenuRunnerMac(); 22 ~CefMenuRunnerMac() override; 23 24 // CefMenuRunner methods. 25 bool RunContextMenu(AlloyBrowserHostImpl* browser, 26 CefMenuModelImpl* model, 27 const content::ContextMenuParams& params) override; 28 void CancelContextMenu() override; 29 30 private: 31 base::scoped_nsobject<MenuControllerCocoa> menu_controller_; 32 }; 33 34 #endif // CEF_LIBCEF_BROWSER_NATIVE_MENU_RUNNER_MAC_H_ 35