| OLD | NEW |
| 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/ws/window_tree.h" | 5 #include "services/ui/ws/window_tree.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 return; | 1178 return; |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 const ui::mojom::EventType event_type_whitelist[] = { | 1181 const ui::mojom::EventType event_type_whitelist[] = { |
| 1182 ui::mojom::EventType::POINTER_CANCEL, ui::mojom::EventType::POINTER_DOWN, | 1182 ui::mojom::EventType::POINTER_CANCEL, ui::mojom::EventType::POINTER_DOWN, |
| 1183 ui::mojom::EventType::POINTER_MOVE, ui::mojom::EventType::POINTER_UP, | 1183 ui::mojom::EventType::POINTER_MOVE, ui::mojom::EventType::POINTER_UP, |
| 1184 ui::mojom::EventType::MOUSE_EXIT, ui::mojom::EventType::WHEEL, | 1184 ui::mojom::EventType::MOUSE_EXIT, ui::mojom::EventType::WHEEL, |
| 1185 }; | 1185 }; |
| 1186 | 1186 |
| 1187 if (matcher->type_matcher) { | 1187 if (matcher->type_matcher) { |
| 1188 auto iter = | 1188 auto* iter = |
| 1189 std::find(std::begin(event_type_whitelist), | 1189 std::find(std::begin(event_type_whitelist), |
| 1190 std::end(event_type_whitelist), matcher->type_matcher->type); | 1190 std::end(event_type_whitelist), matcher->type_matcher->type); |
| 1191 if (iter == std::end(event_type_whitelist)) { | 1191 if (iter == std::end(event_type_whitelist)) { |
| 1192 DVLOG(1) << "SetEventObserver event type not allowed"; | 1192 DVLOG(1) << "SetEventObserver event type not allowed"; |
| 1193 return; | 1193 return; |
| 1194 } | 1194 } |
| 1195 } | 1195 } |
| 1196 if (matcher->pointer_kind_matcher) { | 1196 if (matcher->pointer_kind_matcher) { |
| 1197 ui::mojom::PointerKind pointer_kind = | 1197 ui::mojom::PointerKind pointer_kind = |
| 1198 matcher->pointer_kind_matcher->pointer_kind; | 1198 matcher->pointer_kind_matcher->pointer_kind; |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1669 } | 1669 } |
| 1670 | 1670 |
| 1671 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( | 1671 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( |
| 1672 const ServerWindow* window) const { | 1672 const ServerWindow* window) const { |
| 1673 WindowTree* tree = window_server_->GetTreeWithRoot(window); | 1673 WindowTree* tree = window_server_->GetTreeWithRoot(window); |
| 1674 return tree && tree != this; | 1674 return tree && tree != this; |
| 1675 } | 1675 } |
| 1676 | 1676 |
| 1677 } // namespace ws | 1677 } // namespace ws |
| 1678 } // namespace ui | 1678 } // namespace ui |
| OLD | NEW |