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

Side by Side Diff: services/ui/public/cpp/lib/window_tree_client.cc

Issue 2125883003: Adds ability for pre-target accelerators to not consume events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 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/public/cpp/BUILD.gn ('k') | services/ui/public/cpp/tests/window_server_test_base.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "services/ui/public/cpp/window_tree_client.h" 5 #include "services/ui/public/cpp/window_tree_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 1180
1181 void WindowTreeClient::WmCancelMoveLoop(uint32_t change_id) { 1181 void WindowTreeClient::WmCancelMoveLoop(uint32_t change_id) {
1182 if (!window_manager_delegate_ || change_id != current_wm_move_loop_change_) 1182 if (!window_manager_delegate_ || change_id != current_wm_move_loop_change_)
1183 return; 1183 return;
1184 1184
1185 Window* window = GetWindowByServerId(current_wm_move_loop_window_id_); 1185 Window* window = GetWindowByServerId(current_wm_move_loop_window_id_);
1186 if (window) 1186 if (window)
1187 window_manager_delegate_->OnWmCancelMoveLoop(window); 1187 window_manager_delegate_->OnWmCancelMoveLoop(window);
1188 } 1188 }
1189 1189
1190 void WindowTreeClient::OnAccelerator(uint32_t id, 1190 void WindowTreeClient::OnAccelerator(uint32_t ack_id,
1191 uint32_t accelerator_id,
1191 std::unique_ptr<ui::Event> event) { 1192 std::unique_ptr<ui::Event> event) {
1192 DCHECK(event); 1193 DCHECK(event);
1193 window_manager_delegate_->OnAccelerator(id, *event.get()); 1194 const mojom::EventResult result =
1195 window_manager_delegate_->OnAccelerator(accelerator_id, *event.get());
1196 if (ack_id && window_manager_internal_client_)
1197 window_manager_internal_client_->OnAcceleratorAck(ack_id, result);
1194 } 1198 }
1195 1199
1196 void WindowTreeClient::SetFrameDecorationValues( 1200 void WindowTreeClient::SetFrameDecorationValues(
1197 mojom::FrameDecorationValuesPtr values) { 1201 mojom::FrameDecorationValuesPtr values) {
1198 if (window_manager_internal_client_) { 1202 if (window_manager_internal_client_) {
1199 window_manager_internal_client_->WmSetFrameDecorationValues( 1203 window_manager_internal_client_->WmSetFrameDecorationValues(
1200 std::move(values)); 1204 std::move(values));
1201 } 1205 }
1202 } 1206 }
1203 1207
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 Window* window, 1246 Window* window,
1243 const gfx::Vector2d& offset, 1247 const gfx::Vector2d& offset,
1244 const gfx::Insets& hit_area) { 1248 const gfx::Insets& hit_area) {
1245 if (window_manager_internal_client_) { 1249 if (window_manager_internal_client_) {
1246 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 1250 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
1247 server_id(window), offset.x(), offset.y(), hit_area); 1251 server_id(window), offset.x(), offset.y(), hit_area);
1248 } 1252 }
1249 } 1253 }
1250 1254
1251 } // namespace ui 1255 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/BUILD.gn ('k') | services/ui/public/cpp/tests/window_server_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698