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

Side by Side Diff: chrome/renderer/media/cast_session_delegate.h

Issue 1123733002: [chrome/renderer/media] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit Created 5 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
« no previous file with comments | « chrome/renderer/media/cast_session.cc ('k') | chrome/renderer/media/cast_session_delegate.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 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 CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ 5 #ifndef CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_
6 #define CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ 6 #define CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
16 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
17 #include "base/time/default_tick_clock.h" 17 #include "base/time/default_tick_clock.h"
18 #include "media/cast/cast_config.h" 18 #include "media/cast/cast_config.h"
19 #include "media/cast/cast_sender.h" 19 #include "media/cast/cast_sender.h"
20 #include "media/cast/logging/logging_defines.h" 20 #include "media/cast/logging/logging_defines.h"
21 21
22 namespace base { 22 namespace base {
23 class BinaryValue; 23 class BinaryValue;
24 class DictionaryValue; 24 class DictionaryValue;
25 class MessageLoopProxy; 25 class SingleThreadTaskRunner;
26 } // namespace base 26 } // namespace base
27 27
28 namespace media { 28 namespace media {
29 class VideoFrame; 29 class VideoFrame;
30 30
31 namespace cast { 31 namespace cast {
32 class CastEnvironment; 32 class CastEnvironment;
33 class FrameInput; 33 class FrameInput;
34 class RawEventSubscriberBundle; 34 class RawEventSubscriberBundle;
35 35
(...skipping 28 matching lines...) Expand all
64 virtual void ReceivePacket(scoped_ptr<media::cast::Packet> packet) = 0; 64 virtual void ReceivePacket(scoped_ptr<media::cast::Packet> packet) = 0;
65 virtual void LogRawEvents( 65 virtual void LogRawEvents(
66 const std::vector<media::cast::PacketEvent>& packet_events, 66 const std::vector<media::cast::PacketEvent>& packet_events,
67 const std::vector<media::cast::FrameEvent>& frame_events) = 0; 67 const std::vector<media::cast::FrameEvent>& frame_events) = 0;
68 68
69 base::ThreadChecker thread_checker_; 69 base::ThreadChecker thread_checker_;
70 scoped_refptr<media::cast::CastEnvironment> cast_environment_; 70 scoped_refptr<media::cast::CastEnvironment> cast_environment_;
71 scoped_ptr<media::cast::CastTransportSender> cast_transport_; 71 scoped_ptr<media::cast::CastTransportSender> cast_transport_;
72 72
73 // Proxy to the IO message loop. 73 // Proxy to the IO message loop.
74 const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 74 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
75 base::WeakPtrFactory<CastSessionDelegateBase> weak_factory_; 75 base::WeakPtrFactory<CastSessionDelegateBase> weak_factory_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegateBase); 77 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegateBase);
78 }; 78 };
79 79
80 // This class hosts CastSender and connects it to audio/video frame input 80 // This class hosts CastSender and connects it to audio/video frame input
81 // and network socket. 81 // and network socket.
82 // This class is created on the render thread and destroyed on the IO 82 // This class is created on the render thread and destroyed on the IO
83 // thread. All methods are accessible only on the IO thread. 83 // thread. All methods are accessible only on the IO thread.
84 class CastSessionDelegate : public CastSessionDelegateBase { 84 class CastSessionDelegate : public CastSessionDelegateBase {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 VideoFrameInputAvailableCallback video_frame_input_available_callback_; 147 VideoFrameInputAvailableCallback video_frame_input_available_callback_;
148 148
149 scoped_ptr<media::cast::RawEventSubscriberBundle> event_subscribers_; 149 scoped_ptr<media::cast::RawEventSubscriberBundle> event_subscribers_;
150 150
151 base::WeakPtrFactory<CastSessionDelegate> weak_factory_; 151 base::WeakPtrFactory<CastSessionDelegate> weak_factory_;
152 152
153 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); 153 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate);
154 }; 154 };
155 155
156 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ 156 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_session.cc ('k') | chrome/renderer/media/cast_session_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698