• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2016 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_VIEWS_MENU_RUNNER_VIEWS_H_
6 #define CEF_LIBCEF_BROWSER_VIEWS_MENU_RUNNER_VIEWS_H_
7 #pragma once
8 
9 #include "libcef/browser/menu_runner.h"
10 
11 class CefBrowserViewImpl;
12 
13 class CefMenuRunnerViews : public CefMenuRunner {
14  public:
15   // |browser_view| is guaranteed to outlive this object.
16   explicit CefMenuRunnerViews(CefBrowserViewImpl* browser_view);
17 
18   // CefMenuRunner methods.
19   bool RunContextMenu(AlloyBrowserHostImpl* browser,
20                       CefMenuModelImpl* model,
21                       const content::ContextMenuParams& params) override;
22   void CancelContextMenu() override;
23   bool FormatLabel(std::u16string& label) override;
24 
25  private:
26   CefBrowserViewImpl* browser_view_;
27 };
28 
29 #endif  // CEF_LIBCEF_BROWSER_VIEWS_MENU_RUNNER_VIEWS_H_
30