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

Side by Side Diff: ui/views/controls/menu/menu_controller.cc

Issue 1757993004: Added ink drop hover/ripple to menu hosting bookmark buttons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sky@ & varkha@ comments. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/button/menu_button.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/menu/menu_controller.h" 5 #include "ui/views/controls/menu/menu_controller.h"
6 6
7 #include "base/i18n/case_conversion.h" 7 #include "base/i18n/case_conversion.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 delegate_->SiblingMenuCreated(alt_menu); 1444 delegate_->SiblingMenuCreated(alt_menu);
1445 1445
1446 if (!button) { 1446 if (!button) {
1447 // If the delegate returns a menu, they must also return a button. 1447 // If the delegate returns a menu, they must also return a button.
1448 NOTREACHED(); 1448 NOTREACHED();
1449 return false; 1449 return false;
1450 } 1450 }
1451 1451
1452 // There is a sibling menu, update the button state, hide the current menu 1452 // There is a sibling menu, update the button state, hide the current menu
1453 // and show the new one. 1453 // and show the new one.
1454 pressed_lock_.reset(new MenuButton::PressedLock(button)); 1454 pressed_lock_.reset(
1455 new MenuButton::PressedLock(button, true /* is_sibling_menu_show */));
1455 1456
1456 // Need to reset capture when we show the menu again, otherwise we aren't 1457 // Need to reset capture when we show the menu again, otherwise we aren't
1457 // going to get any events. 1458 // going to get any events.
1458 did_capture_ = false; 1459 did_capture_ = false;
1459 gfx::Point screen_menu_loc; 1460 gfx::Point screen_menu_loc;
1460 View::ConvertPointToScreen(button, &screen_menu_loc); 1461 View::ConvertPointToScreen(button, &screen_menu_loc);
1461 1462
1462 // It is currently not possible to show a submenu recursively in a bubble. 1463 // It is currently not possible to show a submenu recursively in a bubble.
1463 DCHECK(!MenuItemView::IsBubble(anchor)); 1464 DCHECK(!MenuItemView::IsBubble(anchor));
1464 // Subtract 1 from the height to make the popup flush with the button border. 1465 // Subtract 1 from the height to make the popup flush with the button border.
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 return; 2646 return;
2646 } 2647 }
2647 if (hot_button_) 2648 if (hot_button_)
2648 hot_button_->SetHotTracked(false); 2649 hot_button_->SetHotTracked(false);
2649 hot_button_ = hot_button; 2650 hot_button_ = hot_button;
2650 if (hot_button) 2651 if (hot_button)
2651 hot_button->SetHotTracked(true); 2652 hot_button->SetHotTracked(true);
2652 } 2653 }
2653 2654
2654 } // namespace views 2655 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/menu_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698