| 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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 has_pointer_watcher_ = true; | 940 has_pointer_watcher_ = true; |
| 941 tree_->StartPointerWatcher(want_moves); | 941 tree_->StartPointerWatcher(want_moves); |
| 942 } | 942 } |
| 943 | 943 |
| 944 void WindowTreeClient::StopPointerWatcher() { | 944 void WindowTreeClient::StopPointerWatcher() { |
| 945 DCHECK(has_pointer_watcher_); | 945 DCHECK(has_pointer_watcher_); |
| 946 tree_->StopPointerWatcher(); | 946 tree_->StopPointerWatcher(); |
| 947 has_pointer_watcher_ = false; | 947 has_pointer_watcher_ = false; |
| 948 } | 948 } |
| 949 | 949 |
| 950 cc::FrameSinkId WindowTreeClient::GetFrameSinkId(Id window_id) { |
| 951 DCHECK(tree_); |
| 952 base::Optional<cc::FrameSinkId> frame_sink_id; |
| 953 mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; |
| 954 if (!tree_->GetFrameSinkId(window_id, &frame_sink_id) || !frame_sink_id) { |
| 955 DLOG(WARNING) << "GetFrameSinkId failed!"; |
| 956 return cc::FrameSinkId(); |
| 957 } |
| 958 return *frame_sink_id; |
| 959 } |
| 960 |
| 950 void WindowTreeClient::AddObserver(WindowTreeClientObserver* observer) { | 961 void WindowTreeClient::AddObserver(WindowTreeClientObserver* observer) { |
| 951 observers_.AddObserver(observer); | 962 observers_.AddObserver(observer); |
| 952 } | 963 } |
| 953 | 964 |
| 954 void WindowTreeClient::RemoveObserver(WindowTreeClientObserver* observer) { | 965 void WindowTreeClient::RemoveObserver(WindowTreeClientObserver* observer) { |
| 955 observers_.RemoveObserver(observer); | 966 observers_.RemoveObserver(observer); |
| 956 } | 967 } |
| 957 | 968 |
| 958 void WindowTreeClient::AddTestObserver(WindowTreeClientTestObserver* observer) { | 969 void WindowTreeClient::AddTestObserver(WindowTreeClientTestObserver* observer) { |
| 959 test_observers_.AddObserver(observer); | 970 test_observers_.AddObserver(observer); |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2076 } | 2087 } |
| 2077 | 2088 |
| 2078 void WindowTreeClient::OnCompositingLockStateChanged( | 2089 void WindowTreeClient::OnCompositingLockStateChanged( |
| 2079 ui::Compositor* compositor) {} | 2090 ui::Compositor* compositor) {} |
| 2080 | 2091 |
| 2081 void WindowTreeClient::OnCompositingShuttingDown(ui::Compositor* compositor) { | 2092 void WindowTreeClient::OnCompositingShuttingDown(ui::Compositor* compositor) { |
| 2082 compositor->RemoveObserver(this); | 2093 compositor->RemoveObserver(this); |
| 2083 } | 2094 } |
| 2084 | 2095 |
| 2085 } // namespace aura | 2096 } // namespace aura |
| OLD | NEW |