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

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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: ui/views/controls/button/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index afb50bcdb39766206fb3d17c9c36e38233a6fd34..2ff7d4ccb143433cdd56b8d69f1514709e54c080 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -247,7 +247,8 @@ bool CustomButton::AcceleratorPressed(const ui::Accelerator& accelerator) {
return true;
}
-void CustomButton::ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) {
+void CustomButton::ShowContextMenu(const gfx::Point& p,
+ ui::ContextMenuSourceType source_type) {
if (!context_menu_controller())
return;
@@ -255,7 +256,7 @@ void CustomButton::ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) {
// we won't get a mouse exited and reset state. Reset it now to be sure.
if (state_ != STATE_DISABLED)
SetState(STATE_NORMAL);
- View::ShowContextMenu(p, is_mouse_gesture);
+ View::ShowContextMenu(p, source_type);
}
void CustomButton::OnDragDone() {

Powered by Google App Engine
This is Rietveld 408576698