mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Depend directly on chrome targets and unfork code (issue #1947)
This commit is contained in:
@@ -23,13 +23,14 @@ namespace views {
|
||||
|
||||
// A Windows implementation of MenuWrapper.
|
||||
// TODO(beng): rename to MenuWin once the old class is dead.
|
||||
class NativeMenuWin : public MenuWrapper {
|
||||
class CefNativeMenuWin : public MenuWrapper {
|
||||
public:
|
||||
// Construct a NativeMenuWin, with a model and delegate. If |system_menu_for|
|
||||
// is non-NULL, the NativeMenuWin wraps the system menu for that window.
|
||||
// Construct a CefNativeMenuWin, with a model and delegate. If
|
||||
// |system_menu_for| is non-NULL, the CefNativeMenuWin wraps the system menu
|
||||
// for that window.
|
||||
// The caller owns the model and the delegate.
|
||||
NativeMenuWin(ui::MenuModel* model, HWND system_menu_for);
|
||||
~NativeMenuWin() override;
|
||||
CefNativeMenuWin(ui::MenuModel* model, HWND system_menu_for);
|
||||
~CefNativeMenuWin() override;
|
||||
|
||||
// Overridden from MenuWrapper:
|
||||
void RunMenuAt(const gfx::Point& point, int alignment) override;
|
||||
@@ -143,25 +144,25 @@ class NativeMenuWin : public MenuWrapper {
|
||||
bool listeners_called_;
|
||||
|
||||
// See comment in MenuMessageHook for details on these.
|
||||
NativeMenuWin* menu_to_select_;
|
||||
CefNativeMenuWin* menu_to_select_;
|
||||
int position_to_select_;
|
||||
|
||||
// If we're a submenu, this is our parent.
|
||||
NativeMenuWin* parent_;
|
||||
CefNativeMenuWin* parent_;
|
||||
|
||||
// If non-null the destructor sets this to true. This is set to non-null while
|
||||
// the menu is showing. It is used to detect if the menu was deleted while
|
||||
// running.
|
||||
bool* destroyed_flag_;
|
||||
|
||||
base::WeakPtrFactory<NativeMenuWin> menu_to_select_factory_;
|
||||
base::WeakPtrFactory<CefNativeMenuWin> menu_to_select_factory_;
|
||||
|
||||
// Ugly: a static pointer to the instance of this class that currently
|
||||
// has a menu open, because our hook function that receives keyboard
|
||||
// events doesn't have a mechanism to get a user data pointer.
|
||||
static NativeMenuWin* open_native_menu_win_;
|
||||
static CefNativeMenuWin* open_native_menu_win_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NativeMenuWin);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefNativeMenuWin);
|
||||
};
|
||||
|
||||
} // namespace views
|
||||
|
Reference in New Issue
Block a user