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

Side by Side Diff: components/cast_channel/cast_socket.h

Issue 2913033003: [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_SOCKET_H_ 5 #ifndef COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_
6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_SOCKET_H_ 6 #define COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
11 #include <string> 11 #include <string>
12 12
13 #include "base/cancelable_callback.h" 13 #include "base/cancelable_callback.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/threading/thread_checker.h" 17 #include "base/threading/thread_checker.h"
18 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
19 #include "components/cast_channel/cast_auth_util.h"
19 #include "components/cast_channel/cast_channel_enum.h" 20 #include "components/cast_channel/cast_channel_enum.h"
20 #include "extensions/browser/api/api_resource.h" 21 #include "components/cast_channel/cast_socket.h"
21 #include "extensions/browser/api/api_resource_manager.h" 22 #include "components/cast_channel/cast_transport.h"
22 #include "extensions/browser/api/cast_channel/cast_auth_util.h" 23 #include "components/cast_channel/proto/logging.pb.h"
23 #include "extensions/browser/api/cast_channel/cast_socket.h"
24 #include "extensions/browser/api/cast_channel/cast_transport.h"
25 #include "extensions/common/api/cast_channel/logging.pb.h"
26 #include "net/base/completion_callback.h" 24 #include "net/base/completion_callback.h"
27 #include "net/base/io_buffer.h" 25 #include "net/base/io_buffer.h"
28 #include "net/base/ip_endpoint.h" 26 #include "net/base/ip_endpoint.h"
29 #include "net/log/net_log_source.h" 27 #include "net/log/net_log_source.h"
30 28
31 namespace net { 29 namespace net {
32 class CertVerifier; 30 class CertVerifier;
33 class CTPolicyEnforcer; 31 class CTPolicyEnforcer;
34 class CTVerifier; 32 class CTVerifier;
35 class NetLog; 33 class NetLog;
36 class SSLClientSocket; 34 class SSLClientSocket;
37 class StreamSocket; 35 class StreamSocket;
38 class TCPClientSocket; 36 class TCPClientSocket;
39 class TransportSecurityState; 37 class TransportSecurityState;
40 class X509Certificate; 38 class X509Certificate;
41 } 39 }
42 40
43 namespace extensions {
44 namespace api {
45 namespace cast_channel { 41 namespace cast_channel {
46 class CastMessage; 42 class CastMessage;
47 class Logger; 43 class Logger;
48 struct LastErrors; 44 struct LastErrors;
49 45
50 // Cast device capabilities. 46 // Cast device capabilities.
51 enum CastDeviceCapability { 47 enum CastDeviceCapability {
52 NONE = 0, 48 NONE = 0,
53 VIDEO_OUT = 1 << 0, 49 VIDEO_OUT = 1 << 0,
54 VIDEO_IN = 1 << 1, 50 VIDEO_IN = 1 << 1,
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // Runs the external connection callback and resets it. 285 // Runs the external connection callback and resets it.
290 void DoConnectCallback(); 286 void DoConnectCallback();
291 287
292 virtual bool CalledOnValidThread() const; 288 virtual bool CalledOnValidThread() const;
293 289
294 virtual base::Timer* GetTimer(); 290 virtual base::Timer* GetTimer();
295 291
296 void SetConnectState(proto::ConnectionState connect_state); 292 void SetConnectState(proto::ConnectionState connect_state);
297 void SetReadyState(ReadyState ready_state); 293 void SetReadyState(ReadyState ready_state);
298 294
299 base::ThreadChecker thread_checker_; 295 THREAD_CHECKER(thread_checker_);
300 296
301 // The id of the channel. 297 // The id of the channel.
302 int channel_id_; 298 int channel_id_;
303 // The IP endpoint that the the channel is connected to. 299 // The IP endpoint that the the channel is connected to.
304 net::IPEndPoint ip_endpoint_; 300 net::IPEndPoint ip_endpoint_;
305 // Receiver authentication requested for the channel. 301 // Receiver authentication requested for the channel.
306 ChannelAuthType channel_auth_; 302 ChannelAuthType channel_auth_;
307 // The NetLog for this service. 303 // The NetLog for this service.
308 net::NetLog* net_log_; 304 net::NetLog* net_log_;
309 // The NetLog source for this service. 305 // The NetLog source for this service.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // Caller's message read and error handling delegate. 385 // Caller's message read and error handling delegate.
390 std::unique_ptr<CastTransport::Delegate> delegate_; 386 std::unique_ptr<CastTransport::Delegate> delegate_;
391 387
392 // Raw pointer to the auth handshake delegate. Used to get detailed error 388 // Raw pointer to the auth handshake delegate. Used to get detailed error
393 // information. 389 // information.
394 AuthTransportDelegate* auth_delegate_; 390 AuthTransportDelegate* auth_delegate_;
395 391
396 DISALLOW_COPY_AND_ASSIGN(CastSocketImpl); 392 DISALLOW_COPY_AND_ASSIGN(CastSocketImpl);
397 }; 393 };
398 } // namespace cast_channel 394 } // namespace cast_channel
399 } // namespace api
400 } // namespace extensions
401 395
402 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_SOCKET_H_ 396 #endif // COMPONENTS_CAST_CHANNEL_CAST_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698