diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 21:30:14 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 21:30:14 +0000 |
commit | a26cd179accecd10ba9c06e74c656af67d261a58 (patch) | |
tree | c9fa371d25b7cd4a6643977e7ae51baf0fb5bca0 /views | |
parent | 46e3648b7c42918fb82069fca279dd6c799a8149 (diff) | |
download | chromium_src-a26cd179accecd10ba9c06e74c656af67d261a58.zip chromium_src-a26cd179accecd10ba9c06e74c656af67d261a58.tar.gz chromium_src-a26cd179accecd10ba9c06e74c656af67d261a58.tar.bz2 |
Fixes timing issue with when MenuClosed is sent to the
model. MenuClosed needs to be invoked after we schedule the task to
execute the command, otherwise MenuClosed is processed before the
command.
BUG=80077
TEST=see bug
R=ben@chromium.org
Review URL: http://codereview.chromium.org/6903071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/menu/native_menu_win.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/views/controls/menu/native_menu_win.cc b/views/controls/menu/native_menu_win.cc index 4a505a3..97a063b 100644 --- a/views/controls/menu/native_menu_win.cc +++ b/views/controls/menu/native_menu_win.cc @@ -279,9 +279,6 @@ class NativeMenuWin::MenuHostWindow { OnDrawItem(w_param, reinterpret_cast<DRAWITEMSTRUCT*>(l_param)); *l_result = 0; return true; - case WM_EXITMENULOOP: - parent_->model_->MenuClosed(); - return true; // TODO(beng): bring over owner draw from old menu system. } return false; @@ -402,6 +399,9 @@ void NativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) { &NativeMenuWin::DelayedSelect)); menu_action_ = MENU_ACTION_SELECTED; } + // Send MenuClosed after we schedule the select, otherwise MenuClosed is + // processed after the select (MenuClosed posts a delayed task too). + model_->MenuClosed(); } void NativeMenuWin::CancelMenu() { |