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

Unified Diff: services/ui/ws/window_tree.cc

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.h ('k') | ui/aura/mus/window_manager_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index 2e2f73bfdd471cbb3a3beebc78c98f00caf11dfb..9fe2770aad137af56451c301e41c6108236186e1 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -35,6 +35,8 @@
using mojo::InterfaceRequest;
+using EventProperties = std::unordered_map<std::string, std::vector<uint8_t>>;
+
namespace ui {
namespace ws {
@@ -555,6 +557,7 @@ void WindowTree::OnChangeCompleted(uint32_t change_id, bool success) {
void WindowTree::OnAccelerator(uint32_t accelerator_id,
const ui::Event& event,
bool needs_ack) {
+ DVLOG(3) << "OnAccelerator client=" << id_;
DCHECK(window_manager_internal_);
if (needs_ack)
GenerateEventAckId();
@@ -1177,6 +1180,7 @@ uint32_t WindowTree::GenerateEventAckId() {
void WindowTree::DispatchInputEventImpl(ServerWindow* target,
const ui::Event& event) {
+ DVLOG(3) << "DispatchInputEventImpl client=" << id_;
GenerateEventAckId();
WindowManagerDisplayRoot* display_root = GetWindowManagerDisplayRoot(target);
DCHECK(display_root);
@@ -1500,6 +1504,7 @@ void WindowTree::SetImeVisibility(Id transport_window_id,
void WindowTree::OnWindowInputEventAck(uint32_t event_id,
mojom::EventResult result) {
+ DVLOG(3) << "OnWindowInputEventAck client=" << id_;
if (event_ack_id_ == 0 || event_id != event_ack_id_) {
// TODO(sad): Something bad happened. Kill the client?
NOTIMPLEMENTED() << ": Wrong event acked. event_id=" << event_id
@@ -2073,7 +2078,9 @@ void WindowTree::OnWmCreatedTopLevelWindow(uint32_t change_id,
}
void WindowTree::OnAcceleratorAck(uint32_t event_id,
- mojom::EventResult result) {
+ mojom::EventResult result,
+ const EventProperties& properties) {
+ DVLOG(3) << "OnAcceleratorAck client=" << id_;
if (event_ack_id_ == 0 || event_id != event_ack_id_) {
DVLOG(1) << "OnAcceleratorAck supplied invalid event_id";
window_server_->WindowManagerSentBogusMessage();
@@ -2081,7 +2088,7 @@ void WindowTree::OnAcceleratorAck(uint32_t event_id,
}
event_ack_id_ = 0;
DCHECK(window_manager_state_);
- window_manager_state_->OnAcceleratorAck(result);
+ window_manager_state_->OnAcceleratorAck(result, properties);
}
bool WindowTree::HasRootForAccessPolicy(const ServerWindow* window) const {
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | ui/aura/mus/window_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698