| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/client/feature/compositor/blimp_compositor.h" | 5 #include "blimp/client/core/compositor/blimp_compositor.h" |
| 6 | 6 |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "base/threading/thread_local.h" | 13 #include "base/threading/thread_local.h" |
| 14 #include "base/threading/thread_restrictions.h" | 14 #include "base/threading/thread_restrictions.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 122 } |
| 123 | 123 |
| 124 void BlimpCompositor::SendCompositorProto( | 124 void BlimpCompositor::SendCompositorProto( |
| 125 const cc::proto::CompositorMessage& proto) { | 125 const cc::proto::CompositorMessage& proto) { |
| 126 client_->SendCompositorMessage(render_widget_id_, proto); | 126 client_->SendCompositorMessage(render_widget_id_, proto); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void BlimpCompositor::OnCompositorMessageReceived( | 129 void BlimpCompositor::OnCompositorMessageReceived( |
| 130 std::unique_ptr<cc::proto::CompositorMessage> message) { | 130 std::unique_ptr<cc::proto::CompositorMessage> message) { |
| 131 DCHECK(message->has_to_impl()); | 131 DCHECK(message->has_to_impl()); |
| 132 const cc::proto::CompositorMessageToImpl& to_impl_proto = | 132 const cc::proto::CompositorMessageToImpl& to_impl_proto = message->to_impl(); |
| 133 message->to_impl(); | |
| 134 | 133 |
| 135 DCHECK(to_impl_proto.has_message_type()); | 134 DCHECK(to_impl_proto.has_message_type()); |
| 136 switch (to_impl_proto.message_type()) { | 135 switch (to_impl_proto.message_type()) { |
| 137 case cc::proto::CompositorMessageToImpl::UNKNOWN: | 136 case cc::proto::CompositorMessageToImpl::UNKNOWN: |
| 138 NOTIMPLEMENTED() << "Ignoring message of UNKNOWN type"; | 137 NOTIMPLEMENTED() << "Ignoring message of UNKNOWN type"; |
| 139 break; | 138 break; |
| 140 case cc::proto::CompositorMessageToImpl::INITIALIZE_IMPL: | 139 case cc::proto::CompositorMessageToImpl::INITIALIZE_IMPL: |
| 141 DCHECK(!host_); | 140 DCHECK(!host_); |
| 142 DCHECK(to_impl_proto.has_initialize_impl_message()); | 141 DCHECK(to_impl_proto.has_initialize_impl_message()); |
| 143 | 142 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 // Cancel any outstanding OutputSurface requests. That way if we get an async | 312 // Cancel any outstanding OutputSurface requests. That way if we get an async |
| 314 // callback related to the old request we know to drop it. | 313 // callback related to the old request we know to drop it. |
| 315 output_surface_request_pending_ = false; | 314 output_surface_request_pending_ = false; |
| 316 | 315 |
| 317 // Make sure we don't have a receiver at this point. | 316 // Make sure we don't have a receiver at this point. |
| 318 DCHECK(!remote_proto_channel_receiver_); | 317 DCHECK(!remote_proto_channel_receiver_); |
| 319 } | 318 } |
| 320 | 319 |
| 321 } // namespace client | 320 } // namespace client |
| 322 } // namespace blimp | 321 } // namespace blimp |
| OLD | NEW |