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

Side by Side Diff: media/blink/webmediaplayer_params.h

Issue 1972783003: Disable idle suspend for Chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify suspend state logic, and rebase Created 4 years, 7 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BLINK_WEBMEDIAPLAYER_PARAMS_H_ 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const DeferLoadCB& defer_load_cb, 50 const DeferLoadCB& defer_load_cb,
51 const scoped_refptr<SwitchableAudioRendererSink>& audio_renderer_sink, 51 const scoped_refptr<SwitchableAudioRendererSink>& audio_renderer_sink,
52 const scoped_refptr<MediaLog>& media_log, 52 const scoped_refptr<MediaLog>& media_log,
53 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 53 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
54 const scoped_refptr<base::TaskRunner>& worker_task_runner, 54 const scoped_refptr<base::TaskRunner>& worker_task_runner,
55 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, 55 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
56 const Context3DCB& context_3d, 56 const Context3DCB& context_3d,
57 const AdjustAllocatedMemoryCB& adjust_allocated_memory_cb, 57 const AdjustAllocatedMemoryCB& adjust_allocated_memory_cb,
58 blink::WebContentDecryptionModule* initial_cdm, 58 blink::WebContentDecryptionModule* initial_cdm,
59 SurfaceManager* surface_manager, 59 SurfaceManager* surface_manager,
60 blink::WebMediaSession* media_session); 60 blink::WebMediaSession* media_session,
61 bool allow_idle_suspend);
61 62
62 ~WebMediaPlayerParams(); 63 ~WebMediaPlayerParams();
63 64
64 DeferLoadCB defer_load_cb() const { return defer_load_cb_; } 65 DeferLoadCB defer_load_cb() const { return defer_load_cb_; }
65 66
66 const scoped_refptr<SwitchableAudioRendererSink>& audio_renderer_sink() 67 const scoped_refptr<SwitchableAudioRendererSink>& audio_renderer_sink()
67 const { 68 const {
68 return audio_renderer_sink_; 69 return audio_renderer_sink_;
69 } 70 }
70 71
(...skipping 21 matching lines...) Expand all
92 } 93 }
93 94
94 AdjustAllocatedMemoryCB adjust_allocated_memory_cb() const { 95 AdjustAllocatedMemoryCB adjust_allocated_memory_cb() const {
95 return adjust_allocated_memory_cb_; 96 return adjust_allocated_memory_cb_;
96 } 97 }
97 98
98 SurfaceManager* surface_manager() const { return surface_manager_; } 99 SurfaceManager* surface_manager() const { return surface_manager_; }
99 100
100 const blink::WebMediaSession* media_session() const { return media_session_; } 101 const blink::WebMediaSession* media_session() const { return media_session_; }
101 102
103 bool allow_idle_suspend() const { return allow_idle_suspend_; }
104
102 private: 105 private:
103 DeferLoadCB defer_load_cb_; 106 DeferLoadCB defer_load_cb_;
104 scoped_refptr<SwitchableAudioRendererSink> audio_renderer_sink_; 107 scoped_refptr<SwitchableAudioRendererSink> audio_renderer_sink_;
105 scoped_refptr<MediaLog> media_log_; 108 scoped_refptr<MediaLog> media_log_;
106 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; 109 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
107 scoped_refptr<base::TaskRunner> worker_task_runner_; 110 scoped_refptr<base::TaskRunner> worker_task_runner_;
108 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; 111 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
109 Context3DCB context_3d_cb_; 112 Context3DCB context_3d_cb_;
110 AdjustAllocatedMemoryCB adjust_allocated_memory_cb_; 113 AdjustAllocatedMemoryCB adjust_allocated_memory_cb_;
111 114
112 blink::WebContentDecryptionModule* initial_cdm_; 115 blink::WebContentDecryptionModule* initial_cdm_;
113 SurfaceManager* surface_manager_; 116 SurfaceManager* surface_manager_;
114 117
115 blink::WebMediaSession* media_session_; 118 blink::WebMediaSession* media_session_;
119 const bool allow_idle_suspend_;
116 120
117 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); 121 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams);
118 }; 122 };
119 123
120 } // namespace media 124 } // namespace media
121 125
122 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_ 126 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698