Chromium Code Reviews| Index: views/controls/menu/menu_controller.cc |
| diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc |
| index 2533cef20872a784db372cc6817af07bee8ec426..4fa5beeb69eea457e5e5a61db6304be7138f45fa 100644 |
| --- a/views/controls/menu/menu_controller.cc |
| +++ b/views/controls/menu/menu_controller.cc |
| @@ -303,9 +303,14 @@ MenuItemView* MenuController::Run(gfx::NativeWindow parent, |
| menu_button_ = button; |
| } |
| - // Make sure Chrome doesn't attempt to shut down while the menu is showing. |
| + // Make sure Chrome doesn't attempt to shut down while the menu is |
| + // showing. We don't ref and unref the ViewsDelegate for ChromeOS |
| + // because this will exit the message loop if no browsers exist, |
| + // (e.g. on the login screen). |
| +#if !defined(OS_CHROMEOS) |
|
oshima
2011/04/14 17:27:31
This looks suspicious. Let's discuss offline.
rhashimoto
2011/04/14 18:27:04
Sounds like a good idea.
rhashimoto
2011/04/15 21:20:27
Reverted to original file. The login screen shoul
|
| if (ViewsDelegate::views_delegate) |
| - ViewsDelegate::views_delegate->AddRef(); |
| + ViewsDelegate::views_delegate->AddRef(); |
| +#endif |
| // We need to turn on nestable tasks as in some situations (pressing alt-f for |
| // one) the menus are run from a task. If we don't do this and are invoked |
| @@ -317,8 +322,10 @@ MenuItemView* MenuController::Run(gfx::NativeWindow parent, |
| loop->Run(this); |
| loop->SetNestableTasksAllowed(did_allow_task_nesting); |
| +#if !defined(OS_CHROMEOS) |
| if (ViewsDelegate::views_delegate) |
| ViewsDelegate::views_delegate->ReleaseRef(); |
| +#endif |
| // Close any open menus. |
| SetSelection(NULL, SELECTION_UPDATE_IMMEDIATELY | SELECTION_EXIT); |