Index: ui/views/views_delegate.h |
diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h |
index e2f33b05caa5e032b7575788c8e6b364d7b61e6d..082da9ef1bd23659597831e9873e270445c1b02e 100644 |
--- a/ui/views/views_delegate.h |
+++ b/ui/views/views_delegate.h |
@@ -73,6 +73,16 @@ class VIEWS_EXPORT ViewsDelegate { |
}; |
#endif |
+ enum ProcessMenuAcceleratorResult { |
sky
2015/09/10 16:20:33
enum class
afakhry
2015/09/10 17:00:29
Done.
|
+ // The accelerator was handled while the menu was showing. No further action |
+ // is needed. |
+ ACCELERATOR_HANDLED, |
sky
2015/09/10 16:20:33
The names and use is counter what I would have exp
afakhry
2015/09/10 17:00:29
Done.
|
+ |
+ // The accelerator was not handled. Menu should be closed and the |
+ // accelerator will be reposted to be handled after the menu closes. |
+ ACCELERATOR_NOT_HANDLED |
+ }; |
+ |
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( |
+ 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; |