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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 if (ack_callback_) { | 101 if (ack_callback_) { |
102 ack_callback_->Run(handled_ ? ui::mojom::EventResult::HANDLED | 102 ack_callback_->Run(handled_ ? ui::mojom::EventResult::HANDLED |
103 : ui::mojom::EventResult::UNHANDLED); | 103 : ui::mojom::EventResult::UNHANDLED); |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 void set_handled(bool handled) { handled_ = handled; } | 107 void set_handled(bool handled) { handled_ = handled; } |
108 | 108 |
109 // base::RunLoop::NestingObserver: | 109 // base::RunLoop::NestingObserver: |
110 void OnBeginNestedRunLoop() override { | 110 void OnBeginNestedRunLoop() override { |
111 // Acknowledge the event immediately if a nested message loop starts. | 111 // Acknowledge the event immediately if a nested run loop starts. |
112 // Otherwise we appear unresponsive for the life of the nested message loop. | 112 // Otherwise we appear unresponsive for the life of the nested run loop. |
113 if (ack_callback_) { | 113 if (ack_callback_) { |
114 ack_callback_->Run(ui::mojom::EventResult::HANDLED); | 114 ack_callback_->Run(ui::mojom::EventResult::HANDLED); |
115 ack_callback_.reset(); | 115 ack_callback_.reset(); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 private: | 119 private: |
120 std::unique_ptr<EventResultCallback> ack_callback_; | 120 std::unique_ptr<EventResultCallback> ack_callback_; |
121 bool handled_ = false; | 121 bool handled_ = false; |
122 | 122 |
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2038 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( | 2038 return ScheduleInFlightChange(base::MakeUnique<InFlightCaptureChange>( |
2039 this, capture_synchronizer_.get(), window)); | 2039 this, capture_synchronizer_.get(), window)); |
2040 } | 2040 } |
2041 | 2041 |
2042 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { | 2042 uint32_t WindowTreeClient::CreateChangeIdForFocus(WindowMus* window) { |
2043 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( | 2043 return ScheduleInFlightChange(base::MakeUnique<InFlightFocusChange>( |
2044 this, focus_synchronizer_.get(), window)); | 2044 this, focus_synchronizer_.get(), window)); |
2045 } | 2045 } |
2046 | 2046 |
2047 } // namespace aura | 2047 } // namespace aura |
OLD | NEW |