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 "ui/aura/mus/window_tree_client.h" | 5 #include "ui/aura/mus/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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 namespace { | 57 namespace { |
58 | 58 |
59 Id MakeTransportId(ClientSpecificId client_id, ClientSpecificId local_id) { | 59 Id MakeTransportId(ClientSpecificId client_id, ClientSpecificId local_id) { |
60 return (client_id << 16) | local_id; | 60 return (client_id << 16) | local_id; |
61 } | 61 } |
62 | 62 |
63 inline uint16_t HiWord(uint32_t id) { | 63 inline uint16_t HiWord(uint32_t id) { |
64 return static_cast<uint16_t>((id >> 16) & 0xFFFF); | 64 return static_cast<uint16_t>((id >> 16) & 0xFFFF); |
65 } | 65 } |
66 | 66 |
67 inline uint16_t LoWord(uint32_t id) { | |
68 return static_cast<uint16_t>(id & 0xFFFF); | |
69 } | |
70 | |
71 struct WindowPortPropertyDataMus : public WindowPortPropertyData { | 67 struct WindowPortPropertyDataMus : public WindowPortPropertyData { |
72 std::string transport_name; | 68 std::string transport_name; |
73 std::unique_ptr<std::vector<uint8_t>> transport_value; | 69 std::unique_ptr<std::vector<uint8_t>> transport_value; |
74 }; | 70 }; |
75 | 71 |
76 // Handles acknowledgment of an input event, either immediately when a nested | 72 // Handles acknowledgment of an input event, either immediately when a nested |
77 // message loop starts, or upon destruction. | 73 // message loop starts, or upon destruction. |
78 class EventAckHandler : public base::MessageLoop::NestingObserver { | 74 class EventAckHandler : public base::MessageLoop::NestingObserver { |
79 public: | 75 public: |
80 explicit EventAckHandler(std::unique_ptr<EventResultCallback> ack_callback) | 76 explicit EventAckHandler(std::unique_ptr<EventResultCallback> ack_callback) |
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 1583 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
1588 this, capture_synchronizer_.get(), window)); | 1584 this, capture_synchronizer_.get(), window)); |
1589 } | 1585 } |
1590 | 1586 |
1591 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 1587 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
1592 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 1588 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
1593 this, focus_synchronizer_.get(), window)); | 1589 this, focus_synchronizer_.get(), window)); |
1594 } | 1590 } |
1595 | 1591 |
1596 } // namespace aura | 1592 } // namespace aura |
OLD | NEW |