OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ |
6 #define MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ | 6 #define MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 std::unique_ptr<remoting::pb::RpcMessage> message); | 117 std::unique_ptr<remoting::pb::RpcMessage> message); |
118 void OnVideoNaturalSizeChange( | 118 void OnVideoNaturalSizeChange( |
119 std::unique_ptr<remoting::pb::RpcMessage> message); | 119 std::unique_ptr<remoting::pb::RpcMessage> message); |
120 void OnVideoOpacityChange(std::unique_ptr<remoting::pb::RpcMessage> message); | 120 void OnVideoOpacityChange(std::unique_ptr<remoting::pb::RpcMessage> message); |
121 void OnStatisticsUpdate(std::unique_ptr<remoting::pb::RpcMessage> message); | 121 void OnStatisticsUpdate(std::unique_ptr<remoting::pb::RpcMessage> message); |
122 void OnDurationChange(std::unique_ptr<remoting::pb::RpcMessage> message); | 122 void OnDurationChange(std::unique_ptr<remoting::pb::RpcMessage> message); |
123 | 123 |
124 // Shut down remoting session. | 124 // Shut down remoting session. |
125 void OnFatalError(PipelineStatus status); | 125 void OnFatalError(PipelineStatus status); |
126 | 126 |
127 // Show interstial accordingly. | |
128 void UpdateInterstitial(); | |
129 | |
130 State state_; | 127 State state_; |
131 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 128 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
132 const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; | 129 const scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; |
133 | 130 |
134 // Current renderer playback time information. | 131 // Current renderer playback time information. |
135 base::TimeDelta current_media_time_; | 132 base::TimeDelta current_media_time_; |
136 base::TimeDelta current_max_time_; | 133 base::TimeDelta current_max_time_; |
137 // Both |current_media_time_| and |current_max_time_| should be protected by | 134 // Both |current_media_time_| and |current_max_time_| should be protected by |
138 // lock because it can be accessed from both media and render main thread. | 135 // lock because it can be accessed from both media and render main thread. |
139 base::Lock time_lock_; | 136 base::Lock time_lock_; |
(...skipping 13 matching lines...) Expand all Loading... |
153 const int rpc_handle_; | 150 const int rpc_handle_; |
154 | 151 |
155 // RPC handle value for render on receiver endpoint. | 152 // RPC handle value for render on receiver endpoint. |
156 int remote_renderer_handle_; | 153 int remote_renderer_handle_; |
157 | 154 |
158 // Callbacks. | 155 // Callbacks. |
159 PipelineStatusCB init_workflow_done_callback_; | 156 PipelineStatusCB init_workflow_done_callback_; |
160 CdmAttachedCB cdm_attached_cb_; | 157 CdmAttachedCB cdm_attached_cb_; |
161 base::Closure flush_cb_; | 158 base::Closure flush_cb_; |
162 | 159 |
163 RemotingInterstitialUI interstitial_ui_; | 160 RemotingInterstitialUI remoting_interstitial_ui_; |
164 | 161 |
165 base::WeakPtrFactory<RemoteRendererImpl> weak_factory_; | 162 base::WeakPtrFactory<RemoteRendererImpl> weak_factory_; |
166 | 163 |
167 DISALLOW_COPY_AND_ASSIGN(RemoteRendererImpl); | 164 DISALLOW_COPY_AND_ASSIGN(RemoteRendererImpl); |
168 }; | 165 }; |
169 | 166 |
170 } // namespace media | 167 } // namespace media |
171 | 168 |
172 #endif // MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ | 169 #endif // MEDIA_REMOTING_REMOTE_RENDERER_IMPL_H_ |
OLD | NEW |