Chromium Code Reviews| 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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 bool WindowTree::EventMatchesPointerWatcher(const ui::Event& event) const { | 1045 bool WindowTree::EventMatchesPointerWatcher(const ui::Event& event) const { |
| 1046 if (!has_pointer_watcher_) | 1046 if (!has_pointer_watcher_) |
| 1047 return false; | 1047 return false; |
| 1048 if (!event.IsPointerEvent()) | 1048 if (!event.IsPointerEvent()) |
| 1049 return false; | 1049 return false; |
| 1050 if (pointer_watcher_want_moves_ && event.type() == ui::ET_POINTER_MOVED) | 1050 if (pointer_watcher_want_moves_ && event.type() == ui::ET_POINTER_MOVED) |
| 1051 return true; | 1051 return true; |
| 1052 return event.type() == ui::ET_POINTER_DOWN || | 1052 return event.type() == ui::ET_POINTER_DOWN || |
| 1053 event.type() == ui::ET_POINTER_UP; | 1053 event.type() == ui::ET_POINTER_UP || |
| 1054 event.type() == ui::ET_POINTER_WHEEL_CHANGED || | |
| 1055 event.type() == ui::ET_POINTER_CAPTURE_CHANGED; | |
|
sky
2016/09/09 21:42:30
I don't think capture_changed is ever sent through
riajiang
2016/09/12 16:15:47
No I don't think I've encountered any capture chan
| |
| 1054 } | 1056 } |
| 1055 | 1057 |
| 1056 void WindowTree::NewWindow( | 1058 void WindowTree::NewWindow( |
| 1057 uint32_t change_id, | 1059 uint32_t change_id, |
| 1058 Id transport_window_id, | 1060 Id transport_window_id, |
| 1059 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) { | 1061 mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) { |
| 1060 std::map<std::string, std::vector<uint8_t>> properties; | 1062 std::map<std::string, std::vector<uint8_t>> properties; |
| 1061 if (!transport_properties.is_null()) { | 1063 if (!transport_properties.is_null()) { |
| 1062 properties = | 1064 properties = |
| 1063 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>(); | 1065 transport_properties.To<std::map<std::string, std::vector<uint8_t>>>(); |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1676 } | 1678 } |
| 1677 | 1679 |
| 1678 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( | 1680 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( |
| 1679 const ServerWindow* window) const { | 1681 const ServerWindow* window) const { |
| 1680 WindowTree* tree = window_server_->GetTreeWithRoot(window); | 1682 WindowTree* tree = window_server_->GetTreeWithRoot(window); |
| 1681 return tree && tree != this; | 1683 return tree && tree != this; |
| 1682 } | 1684 } |
| 1683 | 1685 |
| 1684 } // namespace ws | 1686 } // namespace ws |
| 1685 } // namespace ui | 1687 } // namespace ui |
| OLD | NEW |