Index: chrome/browser/ui/views/toolbar/wrench_menu.cc |
diff --git a/chrome/browser/ui/views/toolbar/wrench_menu.cc b/chrome/browser/ui/views/toolbar/wrench_menu.cc |
index 55c85ab38abc6be5b1f61aeb6f20b44fb6ddc901..83db8356603da080ba3442d6447d1b50970369ca 100644 |
--- a/chrome/browser/ui/views/toolbar/wrench_menu.cc |
+++ b/chrome/browser/ui/views/toolbar/wrench_menu.cc |
@@ -793,6 +793,7 @@ WrenchMenu::WrenchMenu(Browser* browser, int run_flags) |
selected_index_(0), |
bookmark_menu_(NULL), |
feedback_menu_item_(NULL), |
+ screenshot_menu_item_(NULL), |
sky
2015/02/04 17:06:01
nullptr
caelyn
2015/02/04 20:30:12
changing all of these to nullptr while I am here.
|
run_flags_(run_flags) { |
registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, |
content::Source<Profile>(browser_->profile())); |
@@ -1053,10 +1054,11 @@ void WrenchMenu::WillShowMenu(MenuItemView* menu) { |
void WrenchMenu::WillHideMenu(MenuItemView* menu) { |
// Turns off the fade out animation of the wrench menus if |
- // |feedback_menu_item_| is selected. This excludes the wrench menu itself |
- // from the snapshot in the feedback UI. |
- if (menu->HasSubmenu() && feedback_menu_item_ && |
- feedback_menu_item_->IsSelected()) { |
+ // |feedback_menu_item_| or |screenshot_menu_item_| is selected. This |
+ // excludes the wrench menu itself from the screenshot. |
+ if (menu->HasSubmenu() && |
+ ((feedback_menu_item_ && feedback_menu_item_->IsSelected()) || |
+ (screenshot_menu_item_ && screenshot_menu_item_->IsSelected()))) { |
// It's okay to just turn off the animation and no to take care the |
// animation back because the menu widget will be recreated next time |
// it's opened. See ToolbarView::RunMenu() and Init() of this class. |
@@ -1161,6 +1163,13 @@ void WrenchMenu::PopulateMenu(MenuItemView* parent, |
break; |
#endif |
+#if defined(OS_CHROMEOS) |
+ case IDC_TAKE_SCREENSHOT: |
+ DCHECK(!screenshot_menu_item_); |
+ screenshot_menu_item_ = item; |
+ break; |
+#endif |
+ |
case IDC_RECENT_TABS_MENU: |
DCHECK(!recent_tabs_menu_model_delegate_.get()); |
recent_tabs_menu_model_delegate_.reset( |