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 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 void WindowTree::AddAccelerators( | 1755 void WindowTree::AddAccelerators( |
| 1756 std::vector<mojom::AcceleratorPtr> accelerators, | 1756 std::vector<mojom::AcceleratorPtr> accelerators, |
| 1757 const AddAcceleratorsCallback& callback) { | 1757 const AddAcceleratorsCallback& callback) { |
| 1758 DCHECK(window_manager_state_); | 1758 DCHECK(window_manager_state_); |
| 1759 | 1759 |
| 1760 bool success = true; | 1760 bool success = true; |
| 1761 for (auto iter = accelerators.begin(); iter != accelerators.end(); ++iter) { | 1761 for (auto iter = accelerators.begin(); iter != accelerators.end(); ++iter) { |
| 1762 if (!window_manager_state_->event_dispatcher()->AddAccelerator( | 1762 if (!window_manager_state_->event_dispatcher()->AddAccelerator( |
| 1763 iter->get()->id, std::move(iter->get()->event_matcher))) | 1763 iter->get()->id, std::move(iter->get()->event_matcher))) { |
| 1764 DVLOG(1) << "Can't add accelerator " << iter->get()->id; | |
|
mfomitchev
2017/01/03 19:54:35
This isn't detailed enough - compare this to the o
thanhph1
2017/01/06 21:55:56
Done. I reverted this code and put logs in EventDi
| |
| 1764 success = false; | 1765 success = false; |
| 1766 } | |
| 1765 } | 1767 } |
| 1766 callback.Run(success); | 1768 callback.Run(success); |
| 1767 } | 1769 } |
| 1768 | 1770 |
| 1769 void WindowTree::RemoveAccelerator(uint32_t id) { | 1771 void WindowTree::RemoveAccelerator(uint32_t id) { |
| 1770 window_manager_state_->event_dispatcher()->RemoveAccelerator(id); | 1772 window_manager_state_->event_dispatcher()->RemoveAccelerator(id); |
| 1771 } | 1773 } |
| 1772 | 1774 |
| 1773 void WindowTree::AddActivationParent(Id transport_window_id) { | 1775 void WindowTree::AddActivationParent(Id transport_window_id) { |
| 1774 AddActivationParent(ClientWindowId(transport_window_id)); | 1776 AddActivationParent(ClientWindowId(transport_window_id)); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2016 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 2018 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
| 2017 effect_bitmask, callback); | 2019 effect_bitmask, callback); |
| 2018 } | 2020 } |
| 2019 | 2021 |
| 2020 void WindowTree::PerformOnDragDropDone() { | 2022 void WindowTree::PerformOnDragDropDone() { |
| 2021 client()->OnDragDropDone(); | 2023 client()->OnDragDropDone(); |
| 2022 } | 2024 } |
| 2023 | 2025 |
| 2024 } // namespace ws | 2026 } // namespace ws |
| 2025 } // namespace ui | 2027 } // namespace ui |
| OLD | NEW |