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

Side by Side Diff: content/child/child_thread_impl.h

Issue 2383473002: [scheduler] Teach scheduler about audio state (Closed)
Patch Set: Created 4 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 5 #ifndef CONTENT_CHILD_CHILD_THREAD_IMPL_H_
6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Called when the process refcount is 0. 210 // Called when the process refcount is 0.
211 void OnProcessFinalRelease(); 211 void OnProcessFinalRelease();
212 212
213 // Called by subclasses to manually start the MojoShellConnection. Must only 213 // Called by subclasses to manually start the MojoShellConnection. Must only
214 // be called if ChildThreadImpl::Options::auto_start_mojo_shell_connection 214 // be called if ChildThreadImpl::Options::auto_start_mojo_shell_connection
215 // was set to |false| on ChildThreadImpl construction. 215 // was set to |false| on ChildThreadImpl construction.
216 void StartMojoShellConnection(); 216 void StartMojoShellConnection();
217 217
218 virtual bool OnControlMessageReceived(const IPC::Message& msg); 218 virtual bool OnControlMessageReceived(const IPC::Message& msg);
219 virtual void OnProcessBackgrounded(bool backgrounded); 219 virtual void OnProcessBackgrounded(bool backgrounded);
220 virtual void OnAudioStateChanged(bool has_audio_playing);
220 virtual void OnProcessPurgeAndSuspend(); 221 virtual void OnProcessPurgeAndSuspend();
221 222
222 // IPC::Listener implementation: 223 // IPC::Listener implementation:
223 bool OnMessageReceived(const IPC::Message& msg) override; 224 bool OnMessageReceived(const IPC::Message& msg) override;
224 void OnChannelConnected(int32_t peer_pid) override; 225 void OnChannelConnected(int32_t peer_pid) override;
225 void OnChannelError() override; 226 void OnChannelError() override;
226 227
227 bool IsInBrowserProcess() const; 228 bool IsInBrowserProcess() const;
228 scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner(); 229 scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner();
229 230
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 371
371 private: 372 private:
372 struct Options options_; 373 struct Options options_;
373 374
374 DISALLOW_COPY_AND_ASSIGN(Builder); 375 DISALLOW_COPY_AND_ASSIGN(Builder);
375 }; 376 };
376 377
377 } // namespace content 378 } // namespace content
378 379
379 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 380 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698