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 "content/browser/android/in_process/synchronous_compositor_registry_in_
proc.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_registry_in_
proc.h" |
6 | 6 |
7 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 7 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 DCHECK_EQ(output_surface, entry.output_surface); | 101 DCHECK_EQ(output_surface, entry.output_surface); |
102 | 102 |
103 if (entry.IsReady()) | 103 if (entry.IsReady()) |
104 UnregisterObjects(routing_id); | 104 UnregisterObjects(routing_id); |
105 entry.output_surface = nullptr; | 105 entry.output_surface = nullptr; |
106 RemoveEntryIfNeeded(routing_id); | 106 RemoveEntryIfNeeded(routing_id); |
107 } | 107 } |
108 | 108 |
109 void SynchronousCompositorRegistryInProc::RegisterInputHandler( | 109 void SynchronousCompositorRegistryInProc::RegisterInputHandler( |
110 int routing_id, | 110 int routing_id, |
111 SynchronousInputHandlerProxy* synchronous_input_handler_proxy) { | 111 ui::SynchronousInputHandlerProxy* synchronous_input_handler_proxy) { |
112 DCHECK(CalledOnValidThread()); | 112 DCHECK(CalledOnValidThread()); |
113 DCHECK(synchronous_input_handler_proxy); | 113 DCHECK(synchronous_input_handler_proxy); |
114 Entry& entry = entry_map_[routing_id]; | 114 Entry& entry = entry_map_[routing_id]; |
115 DCHECK(!entry.synchronous_input_handler_proxy); | 115 DCHECK(!entry.synchronous_input_handler_proxy); |
116 entry.synchronous_input_handler_proxy = synchronous_input_handler_proxy; | 116 entry.synchronous_input_handler_proxy = synchronous_input_handler_proxy; |
117 CheckIsReady(routing_id); | 117 CheckIsReady(routing_id); |
118 } | 118 } |
119 | 119 |
120 void SynchronousCompositorRegistryInProc::UnregisterInputHandler( | 120 void SynchronousCompositorRegistryInProc::UnregisterInputHandler( |
121 int routing_id) { | 121 int routing_id) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 begin_frame_source(nullptr), | 164 begin_frame_source(nullptr), |
165 output_surface(nullptr), | 165 output_surface(nullptr), |
166 synchronous_input_handler_proxy(nullptr) {} | 166 synchronous_input_handler_proxy(nullptr) {} |
167 | 167 |
168 bool SynchronousCompositorRegistryInProc::Entry::IsReady() { | 168 bool SynchronousCompositorRegistryInProc::Entry::IsReady() { |
169 return compositor && begin_frame_source && output_surface && | 169 return compositor && begin_frame_source && output_surface && |
170 synchronous_input_handler_proxy; | 170 synchronous_input_handler_proxy; |
171 } | 171 } |
172 | 172 |
173 } // namespace content | 173 } // namespace content |
OLD | NEW |