| 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 "cc/trees/threaded_channel.h" | 5 #include "cc/trees/threaded_channel.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 main().proxy_main_weak_factory.GetWeakPtr()) { | 30 main().proxy_main_weak_factory.GetWeakPtr()) { |
| 31 DCHECK(IsMainThread()); | 31 DCHECK(IsMainThread()); |
| 32 } | 32 } |
| 33 | 33 |
| 34 ThreadedChannel::~ThreadedChannel() { | 34 ThreadedChannel::~ThreadedChannel() { |
| 35 TRACE_EVENT0("cc", "ThreadChannel::~ThreadChannel"); | 35 TRACE_EVENT0("cc", "ThreadChannel::~ThreadChannel"); |
| 36 DCHECK(IsMainThread()); | 36 DCHECK(IsMainThread()); |
| 37 DCHECK(!IsInitialized()); | 37 DCHECK(!IsInitialized()); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void ThreadedChannel::UpdateTopControlsStateOnImpl(TopControlsState constraints, | 40 void ThreadedChannel::UpdateTopControlsStateOnImpl( |
| 41 TopControlsState current, | 41 BrowserControlsState constraints, |
| 42 bool animate) { | 42 BrowserControlsState current, |
| 43 bool animate) { |
| 43 DCHECK(IsMainThread()); | 44 DCHECK(IsMainThread()); |
| 44 ImplThreadTaskRunner()->PostTask( | 45 ImplThreadTaskRunner()->PostTask( |
| 45 FROM_HERE, | 46 FROM_HERE, |
| 46 base::Bind(&ProxyImpl::UpdateTopControlsStateOnImpl, proxy_impl_weak_ptr_, | 47 base::Bind(&ProxyImpl::UpdateTopControlsStateOnImpl, proxy_impl_weak_ptr_, |
| 47 constraints, current, animate)); | 48 constraints, current, animate)); |
| 48 } | 49 } |
| 49 | 50 |
| 50 void ThreadedChannel::InitializeCompositorFrameSinkOnImpl( | 51 void ThreadedChannel::InitializeCompositorFrameSinkOnImpl( |
| 51 CompositorFrameSink* output_surface) { | 52 CompositorFrameSink* output_surface) { |
| 52 DCHECK(IsMainThread()); | 53 DCHECK(IsMainThread()); |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 336 |
| 336 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} | 337 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} |
| 337 | 338 |
| 338 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( | 339 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( |
| 339 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) | 340 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) |
| 340 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} | 341 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} |
| 341 | 342 |
| 342 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} | 343 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} |
| 343 | 344 |
| 344 } // namespace cc | 345 } // namespace cc |
| OLD | NEW |