| 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 #ifndef CC_TREES_PROXY_IMPL_H_ | 5 #ifndef CC_TREES_PROXY_IMPL_H_ |
| 6 #define CC_TREES_PROXY_IMPL_H_ | 6 #define CC_TREES_PROXY_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 public: | 27 public: |
| 28 ProxyImpl(base::WeakPtr<ProxyMain> proxy_main_weak_ptr, | 28 ProxyImpl(base::WeakPtr<ProxyMain> proxy_main_weak_ptr, |
| 29 LayerTreeHost* layer_tree_host, | 29 LayerTreeHost* layer_tree_host, |
| 30 TaskRunnerProvider* task_runner_provider); | 30 TaskRunnerProvider* task_runner_provider); |
| 31 ~ProxyImpl() override; | 31 ~ProxyImpl() override; |
| 32 | 32 |
| 33 void UpdateBrowserControlsStateOnImpl(BrowserControlsState constraints, | 33 void UpdateBrowserControlsStateOnImpl(BrowserControlsState constraints, |
| 34 BrowserControlsState current, | 34 BrowserControlsState current, |
| 35 bool animate); | 35 bool animate); |
| 36 void InitializeCompositorFrameSinkOnImpl( | 36 void InitializeCompositorFrameSinkOnImpl( |
| 37 CompositorFrameSink* compositor_frame_sink); | 37 CompositorFrameSink* compositor_frame_sink, |
| 38 base::WeakPtr<ProxyMain> proxy_main_frame_sink_bound_weak_ptr); |
| 38 void InitializeMutatorOnImpl(std::unique_ptr<LayerTreeMutator> mutator); | 39 void InitializeMutatorOnImpl(std::unique_ptr<LayerTreeMutator> mutator); |
| 39 void MainThreadHasStoppedFlingingOnImpl(); | 40 void MainThreadHasStoppedFlingingOnImpl(); |
| 40 void SetInputThrottledUntilCommitOnImpl(bool is_throttled); | 41 void SetInputThrottledUntilCommitOnImpl(bool is_throttled); |
| 41 void SetDeferCommitsOnImpl(bool defer_commits) const; | 42 void SetDeferCommitsOnImpl(bool defer_commits) const; |
| 42 void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect); | 43 void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect); |
| 43 void SetNeedsCommitOnImpl(); | 44 void SetNeedsCommitOnImpl(); |
| 44 void BeginMainFrameAbortedOnImpl( | 45 void BeginMainFrameAbortedOnImpl( |
| 45 CommitEarlyOutReason reason, | 46 CommitEarlyOutReason reason, |
| 46 base::TimeTicks main_thread_start_time, | 47 base::TimeTicks main_thread_start_time, |
| 47 std::vector<std::unique_ptr<SwapPromise>> swap_promises); | 48 std::vector<std::unique_ptr<SwapPromise>> swap_promises); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 143 |
| 143 std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 144 std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
| 144 | 145 |
| 145 // Use accessors instead of this variable directly. | 146 // Use accessors instead of this variable directly. |
| 146 BlockedMainCommitOnly main_thread_blocked_commit_vars_unsafe_; | 147 BlockedMainCommitOnly main_thread_blocked_commit_vars_unsafe_; |
| 147 BlockedMainCommitOnly& blocked_main_commit(); | 148 BlockedMainCommitOnly& blocked_main_commit(); |
| 148 | 149 |
| 149 // Used to post tasks to ProxyMain on the main thread. | 150 // Used to post tasks to ProxyMain on the main thread. |
| 150 base::WeakPtr<ProxyMain> proxy_main_weak_ptr_; | 151 base::WeakPtr<ProxyMain> proxy_main_weak_ptr_; |
| 151 | 152 |
| 153 // A weak pointer to ProxyMain that is invalidated when CompositorFrameSink is |
| 154 // released. |
| 155 base::WeakPtr<ProxyMain> proxy_main_frame_sink_bound_weak_ptr_; |
| 156 |
| 152 DISALLOW_COPY_AND_ASSIGN(ProxyImpl); | 157 DISALLOW_COPY_AND_ASSIGN(ProxyImpl); |
| 153 }; | 158 }; |
| 154 | 159 |
| 155 } // namespace cc | 160 } // namespace cc |
| 156 | 161 |
| 157 #endif // CC_TREES_PROXY_IMPL_H_ | 162 #endif // CC_TREES_PROXY_IMPL_H_ |
| OLD | NEW |