[Win] Add flag to build window menu.

This commit is contained in:
Cheng Zhao 2013-08-17 17:10:16 +08:00
parent 6193a889ff
commit 738a929f8c
2 changed files with 10 additions and 2 deletions

View file

@ -43,6 +43,10 @@ class NativeMenuWin : public MenuWrapper {
virtual void RemoveMenuListener(views::MenuListener* listener) OVERRIDE;
virtual void SetMinimumWidth(int width) OVERRIDE;
// Flag to create a window menu instead of popup menu.
void set_create_as_window_menu(bool flag) { create_as_window_menu_ = flag; }
bool create_as_window_menu() const { return create_as_window_menu_; }
private:
// IMPORTANT: Note about indices.
// Functions in this class deal in two index spaces:
@ -161,6 +165,9 @@ class NativeMenuWin : public MenuWrapper {
// events doesn't have a mechanism to get a user data pointer.
static NativeMenuWin* open_native_menu_win_;
// Create as window menu.
bool create_as_window_menu_;
DISALLOW_COPY_AND_ASSIGN(NativeMenuWin);
};