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

Unified Diff: ui/aura/mus/window_manager_delegate.h

Issue 2761233003: Adds ability for accelerators to add key/value pairs to KeyEvent (Closed)
Patch Set: feedback and compile Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/window_tree.cc ('k') | ui/aura/mus/window_manager_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_manager_delegate.h
diff --git a/ui/aura/mus/window_manager_delegate.h b/ui/aura/mus/window_manager_delegate.h
index 447a7a028ad2be017c7ba30d2e283d789fb62173..177eb7b2efe045d4e1647d34316f8ecfcb1a8b9b 100644
--- a/ui/aura/mus/window_manager_delegate.h
+++ b/ui/aura/mus/window_manager_delegate.h
@@ -10,6 +10,7 @@
#include <map>
#include <memory>
#include <string>
+#include <unordered_map>
#include <vector>
#include "base/callback_forward.h"
@@ -132,8 +133,16 @@ class AURA_EXPORT WindowManagerDelegate {
// Called when a display is modified.
virtual void OnWmDisplayModified(const display::Display& display) = 0;
- virtual ui::mojom::EventResult OnAccelerator(uint32_t id,
- const ui::Event& event);
+ // Called when an accelerator is received. |id| is the id previously
+ // registered via AddAccelerators(). For pre-target accelerators the delegate
+ // may add key/value pairs to |properties| that are then added to the
+ // KeyEvent that is sent to the client with the focused window (only if this
+ // returns UNHANDLED). |properties| may be used to pass around state from the
+ // window manager to clients.
+ virtual ui::mojom::EventResult OnAccelerator(
+ uint32_t id,
+ const ui::Event& event,
+ std::unordered_map<std::string, std::vector<uint8_t>>* properties);
virtual void OnWmPerformMoveLoop(
Window* window,
« no previous file with comments | « services/ui/ws/window_tree.cc ('k') | ui/aura/mus/window_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698