Index: ui/views/views_delegate.h |
diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h |
index e2f33b05caa5e032b7575788c8e6b364d7b61e6d..9b44e7c8dd923cc00364c316f5d448cd50cff7f7 100644 |
--- a/ui/views/views_delegate.h |
+++ b/ui/views/views_delegate.h |
@@ -73,6 +73,16 @@ class VIEWS_EXPORT ViewsDelegate { |
}; |
#endif |
+ enum class ProcessMenuAcceleratorResult { |
+ // The accelerator was handled while the menu was showing. No further action |
+ // is needed and the menu should be kept open. |
+ LEAVE_MENU_OPEN, |
+ |
+ // The accelerator was not handled. Menu should be closed and the |
+ // accelerator will be reposted to be handled after the menu closes. |
+ CLOSE_MENU |
+ }; |
+ |
virtual ~ViewsDelegate(); |
// Returns the ViewsDelegate instance if there is one, or nullptr otherwise. |
@@ -102,6 +112,9 @@ class VIEWS_EXPORT ViewsDelegate { |
int item_count, |
bool has_submenu); |
+ virtual ProcessMenuAcceleratorResult ProcessAcceleratorWhileMenuShowing( |
pkotwicz
2015/09/10 19:13:00
Nit: Can you please add a comment to this function
afakhry
2015/09/10 20:57:13
Done.
|
+ const ui::Accelerator& accelerator); |
+ |
#if defined(OS_WIN) |
// Retrieves the default window icon to use for windows if none is specified. |
virtual HICON GetDefaultWindowIcon() const; |