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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ 5 #ifndef UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
6 #define UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ 6 #define UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <unordered_map>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/callback_forward.h" 16 #include "base/callback_forward.h"
16 #include "services/ui/public/interfaces/cursor.mojom.h" 17 #include "services/ui/public/interfaces/cursor.mojom.h"
17 #include "services/ui/public/interfaces/window_manager.mojom.h" 18 #include "services/ui/public/interfaces/window_manager.mojom.h"
18 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" 19 #include "services/ui/public/interfaces/window_manager_constants.mojom.h"
19 #include "services/ui/public/interfaces/window_tree_constants.mojom.h" 20 #include "services/ui/public/interfaces/window_tree_constants.mojom.h"
20 #include "ui/aura/aura_export.h" 21 #include "ui/aura/aura_export.h"
21 #include "ui/events/mojo/event.mojom.h" 22 #include "ui/events/mojo/event.mojom.h"
22 23
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 std::unique_ptr<WindowTreeHostMus> window_tree_host, 126 std::unique_ptr<WindowTreeHostMus> window_tree_host,
126 const display::Display& display) = 0; 127 const display::Display& display) = 0;
127 128
128 // Called when a display is removed. |window_tree_host| is the WindowTreeHost 129 // Called when a display is removed. |window_tree_host| is the WindowTreeHost
129 // for the display. 130 // for the display.
130 virtual void OnWmDisplayRemoved(WindowTreeHostMus* window_tree_host) = 0; 131 virtual void OnWmDisplayRemoved(WindowTreeHostMus* window_tree_host) = 0;
131 132
132 // Called when a display is modified. 133 // Called when a display is modified.
133 virtual void OnWmDisplayModified(const display::Display& display) = 0; 134 virtual void OnWmDisplayModified(const display::Display& display) = 0;
134 135
135 virtual ui::mojom::EventResult OnAccelerator(uint32_t id, 136 // Called when an accelerator is received. |id| is the id previously
136 const ui::Event& event); 137 // registered via AddAccelerators(). For pre-target accelerators the delegate
138 // may add key/value pairs to |properties| that are then added to the
139 // KeyEvent that is sent to the client with the focused window (only if this
140 // returns UNHANDLED). |properties| may be used to pass around state from the
141 // window manager to clients.
142 virtual ui::mojom::EventResult OnAccelerator(
143 uint32_t id,
144 const ui::Event& event,
145 std::unordered_map<std::string, std::vector<uint8_t>>* properties);
137 146
138 virtual void OnWmPerformMoveLoop( 147 virtual void OnWmPerformMoveLoop(
139 Window* window, 148 Window* window,
140 ui::mojom::MoveLoopSource source, 149 ui::mojom::MoveLoopSource source,
141 const gfx::Point& cursor_location, 150 const gfx::Point& cursor_location,
142 const base::Callback<void(bool)>& on_done) = 0; 151 const base::Callback<void(bool)>& on_done) = 0;
143 152
144 virtual void OnWmCancelMoveLoop(Window* window) = 0; 153 virtual void OnWmCancelMoveLoop(Window* window) = 0;
145 154
146 // Called when then client changes the client area of a window. 155 // Called when then client changes the client area of a window.
147 virtual void OnWmSetClientArea( 156 virtual void OnWmSetClientArea(
148 Window* window, 157 Window* window,
149 const gfx::Insets& insets, 158 const gfx::Insets& insets,
150 const std::vector<gfx::Rect>& additional_client_areas) = 0; 159 const std::vector<gfx::Rect>& additional_client_areas) = 0;
151 160
152 // Returns whether |window| is the current active window. 161 // Returns whether |window| is the current active window.
153 virtual bool IsWindowActive(Window* window) = 0; 162 virtual bool IsWindowActive(Window* window) = 0;
154 163
155 // Called when a client requests that its activation be given to another 164 // Called when a client requests that its activation be given to another
156 // window. 165 // window.
157 virtual void OnWmDeactivateWindow(Window* window) = 0; 166 virtual void OnWmDeactivateWindow(Window* window) = 0;
158 167
159 protected: 168 protected:
160 virtual ~WindowManagerDelegate() {} 169 virtual ~WindowManagerDelegate() {}
161 }; 170 };
162 171
163 } // namespace ui 172 } // namespace ui
164 173
165 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ 174 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
OLDNEW
« 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