OLD | NEW |
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_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "extensions/renderer/object_backed_native_handler.h" | 12 #include "extensions/renderer/object_backed_native_handler.h" |
13 #include "extensions/renderer/scoped_persistent.h" | |
14 #include "v8/include/v8.h" | 13 #include "v8/include/v8.h" |
15 | 14 |
16 class CastRtpStream; | 15 class CastRtpStream; |
17 class CastUdpTransport; | 16 class CastUdpTransport; |
18 | 17 |
19 namespace base { | 18 namespace base { |
20 class BinaryValue; | 19 class BinaryValue; |
21 class DictionaryValue; | 20 class DictionaryValue; |
22 } | 21 } |
23 | 22 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 net::IPEndPoint* ip_endpoint); | 123 net::IPEndPoint* ip_endpoint); |
125 | 124 |
126 int last_transport_id_; | 125 int last_transport_id_; |
127 | 126 |
128 typedef std::map<int, linked_ptr<CastRtpStream> > RtpStreamMap; | 127 typedef std::map<int, linked_ptr<CastRtpStream> > RtpStreamMap; |
129 RtpStreamMap rtp_stream_map_; | 128 RtpStreamMap rtp_stream_map_; |
130 | 129 |
131 typedef std::map<int, linked_ptr<CastUdpTransport> > UdpTransportMap; | 130 typedef std::map<int, linked_ptr<CastUdpTransport> > UdpTransportMap; |
132 UdpTransportMap udp_transport_map_; | 131 UdpTransportMap udp_transport_map_; |
133 | 132 |
134 extensions::ScopedPersistent<v8::Function> create_callback_; | 133 v8::UniquePersistent<v8::Function> create_callback_; |
135 | 134 |
136 typedef std::map<int, | 135 typedef std::map<int, linked_ptr<v8::UniquePersistent<v8::Function>>> |
137 linked_ptr<extensions::ScopedPersistent<v8::Function> > > | |
138 RtpStreamCallbackMap; | 136 RtpStreamCallbackMap; |
139 RtpStreamCallbackMap get_raw_events_callbacks_; | 137 RtpStreamCallbackMap get_raw_events_callbacks_; |
140 RtpStreamCallbackMap get_stats_callbacks_; | 138 RtpStreamCallbackMap get_stats_callbacks_; |
141 | 139 |
142 base::WeakPtrFactory<CastStreamingNativeHandler> weak_factory_; | 140 base::WeakPtrFactory<CastStreamingNativeHandler> weak_factory_; |
143 | 141 |
144 DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler); | 142 DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler); |
145 }; | 143 }; |
146 | 144 |
147 } // namespace extensions | 145 } // namespace extensions |
148 | 146 |
149 #endif // CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ | 147 #endif // CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ |
OLD | NEW |