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

Side by Side Diff: chrome/renderer/extensions/cast_streaming_native_handler.h

Issue 1103273009: Use v8::Local inplace of v8::Handle in src/chrome/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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_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"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // If not found, returns NULL and throws a V8 exception. 108 // If not found, returns NULL and throws a V8 exception.
109 CastRtpStream* GetRtpStreamOrThrow(int stream_id) const; 109 CastRtpStream* GetRtpStreamOrThrow(int stream_id) const;
110 CastUdpTransport* GetUdpTransportOrThrow(int transport_id) const; 110 CastUdpTransport* GetUdpTransportOrThrow(int transport_id) const;
111 111
112 // Fills out a media::cast::FrameReceiverConfig from the v8 112 // Fills out a media::cast::FrameReceiverConfig from the v8
113 // equivialent. (cast.streaming.receiverSession.RtpReceiverParams) 113 // equivialent. (cast.streaming.receiverSession.RtpReceiverParams)
114 // Returns true if everything was ok, raises a v8 exception and 114 // Returns true if everything was ok, raises a v8 exception and
115 // returns false if anything went wrong. 115 // returns false if anything went wrong.
116 bool FrameReceiverConfigFromArg( 116 bool FrameReceiverConfigFromArg(
117 v8::Isolate* isolate, 117 v8::Isolate* isolate,
118 const v8::Handle<v8::Value>& arg, 118 const v8::Local<v8::Value>& arg,
119 media::cast::FrameReceiverConfig* config); 119 media::cast::FrameReceiverConfig* config);
120 120
121 bool IPEndPointFromArg(v8::Isolate* isolate, 121 bool IPEndPointFromArg(v8::Isolate* isolate,
122 const v8::Handle<v8::Value>& arg, 122 const v8::Local<v8::Value>& arg,
123 net::IPEndPoint* ip_endpoint); 123 net::IPEndPoint* ip_endpoint);
124 124
125 int last_transport_id_; 125 int last_transport_id_;
126 126
127 typedef std::map<int, linked_ptr<CastRtpStream> > RtpStreamMap; 127 typedef std::map<int, linked_ptr<CastRtpStream> > RtpStreamMap;
128 RtpStreamMap rtp_stream_map_; 128 RtpStreamMap rtp_stream_map_;
129 129
130 typedef std::map<int, linked_ptr<CastUdpTransport> > UdpTransportMap; 130 typedef std::map<int, linked_ptr<CastUdpTransport> > UdpTransportMap;
131 UdpTransportMap udp_transport_map_; 131 UdpTransportMap udp_transport_map_;
132 132
133 v8::Global<v8::Function> create_callback_; 133 v8::Global<v8::Function> create_callback_;
134 134
135 typedef std::map<int, linked_ptr<v8::Global<v8::Function>>> 135 typedef std::map<int, linked_ptr<v8::Global<v8::Function>>>
136 RtpStreamCallbackMap; 136 RtpStreamCallbackMap;
137 RtpStreamCallbackMap get_raw_events_callbacks_; 137 RtpStreamCallbackMap get_raw_events_callbacks_;
138 RtpStreamCallbackMap get_stats_callbacks_; 138 RtpStreamCallbackMap get_stats_callbacks_;
139 139
140 base::WeakPtrFactory<CastStreamingNativeHandler> weak_factory_; 140 base::WeakPtrFactory<CastStreamingNativeHandler> weak_factory_;
141 141
142 DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler); 142 DISALLOW_COPY_AND_ASSIGN(CastStreamingNativeHandler);
143 }; 143 };
144 144
145 } // namespace extensions 145 } // namespace extensions
146 146
147 #endif // CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_ 147 #endif // CHROME_RENDERER_EXTENSIONS_CAST_STREAMING_NATIVE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/app_bindings.cc ('k') | chrome/renderer/extensions/cast_streaming_native_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698