Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: cc/trees/threaded_channel.h

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | cc/trees/threaded_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_THREADED_CHANNEL_H_ 5 #ifndef CC_TREES_THREADED_CHANNEL_H_
6 #define CC_TREES_THREADED_CHANNEL_H_ 6 #define CC_TREES_THREADED_CHANNEL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // SetLayerTreeClosed 63 // SetLayerTreeClosed
64 // ---------------------------------------------------------------------------- 64 // ----------------------------------------------------------------------------
65 65
66 class CC_EXPORT ThreadedChannel : public ChannelMain, public ChannelImpl { 66 class CC_EXPORT ThreadedChannel : public ChannelMain, public ChannelImpl {
67 public: 67 public:
68 static scoped_ptr<ThreadedChannel> Create( 68 static scoped_ptr<ThreadedChannel> Create(
69 // TODO(khushalsagar): Make this ProxyMain* and write the initialization 69 // TODO(khushalsagar): Make this ProxyMain* and write the initialization
70 // sequence. Currently ThreadProxy implements both so we pass the pointer 70 // sequence. Currently ThreadProxy implements both so we pass the pointer
71 // and set ProxyImpl. 71 // and set ProxyImpl.
72 ThreadProxy* thread_proxy, 72 ThreadProxy* thread_proxy,
73 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 73 TaskRunnerProvider* task_runner_provider);
74 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
75 74
76 ~ThreadedChannel() override; 75 ~ThreadedChannel() override;
77 76
78 // ChannelMain Implementation 77 // ChannelMain Implementation
79 void SetThrottleFrameProductionOnImpl(bool throttle) override; 78 void SetThrottleFrameProductionOnImpl(bool throttle) override;
80 void UpdateTopControlsStateOnImpl(TopControlsState constraints, 79 void UpdateTopControlsStateOnImpl(TopControlsState constraints,
81 TopControlsState current, 80 TopControlsState current,
82 bool animate) override; 81 bool animate) override;
83 void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override; 82 void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override;
84 void MainThreadHasStoppedFlingingOnImpl() override; 83 void MainThreadHasStoppedFlingingOnImpl() override;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void DidCompletePageScaleAnimation() override; 117 void DidCompletePageScaleAnimation() override;
119 void PostFrameTimingEventsOnMain( 118 void PostFrameTimingEventsOnMain(
120 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, 119 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
121 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) 120 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
122 override; 121 override;
123 void BeginMainFrame( 122 void BeginMainFrame(
124 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override; 123 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override;
125 124
126 protected: 125 protected:
127 ThreadedChannel(ThreadProxy* thread_proxy, 126 ThreadedChannel(ThreadProxy* thread_proxy,
128 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 127 TaskRunnerProvider* task_runner_provider);
129 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
130 128
131 private: 129 private:
132 base::SingleThreadTaskRunner* MainThreadTaskRunner() const; 130 base::SingleThreadTaskRunner* MainThreadTaskRunner() const;
133 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const; 131 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const;
134 132
135 ProxyMain* proxy_main_; 133 ProxyMain* proxy_main_;
136 134
137 ProxyImpl* proxy_impl_; 135 ProxyImpl* proxy_impl_;
138 136
139 // TODO(khushalsagar): Temporary variable to access proxy for assertion checks 137 TaskRunnerProvider* task_runner_provider_;
140 // Remove this once the proxy class is split and the complete
141 // implementation for controlling communication across threads is moved to
142 // ThreadedChannel.
143 Proxy* proxy_;
144 138
145 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 139 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
146 140
147 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; 141 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
148 142
149 DISALLOW_COPY_AND_ASSIGN(ThreadedChannel); 143 DISALLOW_COPY_AND_ASSIGN(ThreadedChannel);
150 }; 144 };
151 145
152 } // namespace cc 146 } // namespace cc
153 147
154 #endif // CC_TREES_THREADED_CHANNEL_H_ 148 #endif // CC_TREES_THREADED_CHANNEL_H_
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | cc/trees/threaded_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698