Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: views/controls/menu/menu_controller.cc

Issue 6811025: Change status button menu implementation from Menu2 to MenuItemView. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Changed refcount guard to use OS_CHROMEOS. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698