Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / chrome / renderer / media / cast_udp_transport.h
blobee10c240c2aba1698cffaf579a35c5361d66d93a
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
3 // found in the LICENSE file.
5 #ifndef CHROME_RENDERER_MEDIA_CAST_UDP_TRANSPORT_H_
6 #define CHROME_RENDERER_MEDIA_CAST_UDP_TRANSPORT_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h"
11 #include "net/base/ip_endpoint.h"
13 namespace base {
14 class DictionaryValue;
15 } // namespace base
17 class CastSession;
19 // This class represents the transport mechanism used by Cast RTP streams
20 // to connect to a remote client. It specifies the destination address
21 // and network protocol used to send Cast RTP streams.
22 class CastUdpTransport {
23 public:
24 explicit CastUdpTransport(const scoped_refptr<CastSession>& session);
25 virtual ~CastUdpTransport();
27 // Specify the remote IP address and port.
28 void SetDestination(const net::IPEndPoint& remote_address);
30 // Set options.
31 void SetOptions(scoped_ptr<base::DictionaryValue> options);
33 private:
34 const scoped_refptr<CastSession> cast_session_;
35 net::IPEndPoint remote_address_;
36 scoped_ptr<base::DictionaryValue> options_;
37 base::WeakPtrFactory<CastUdpTransport> weak_factory_;
39 DISALLOW_COPY_AND_ASSIGN(CastUdpTransport);
42 #endif // CHROME_RENDERER_MEDIA_CAST_UDP_TRANSPORT_H_