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

Unified Diff: webkit/glue/p2p_transport.h

Issue 10854131: Remove obsolete webkit_glue::P2PTransport interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.cc ('k') | webkit/glue/p2p_transport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/p2p_transport.h
diff --git a/webkit/glue/p2p_transport.h b/webkit/glue/p2p_transport.h
deleted file mode 100644
index cd24f460d4542f73d48a4d8761eb75ec9758babd..0000000000000000000000000000000000000000
--- a/webkit/glue/p2p_transport.h
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_GLUE_P2P_TRANSPORT_H_
-#define WEBKIT_GLUE_P2P_TRANSPORT_H_
-
-#include <string>
-#include <vector>
-
-#include "base/basictypes.h"
-#include "webkit/glue/webkit_glue_export.h"
-
-namespace net {
-class Socket;
-} // namespace net
-
-namespace WebKit {
-class WebFrame;
-} // namespace WebKit
-
-namespace webkit_glue {
-
-// Interface for P2P transport.
-class P2PTransport {
- public:
- enum State {
- STATE_NONE = 0,
- STATE_WRITABLE = 1,
- STATE_READABLE = 2,
- };
-
- enum Protocol {
- PROTOCOL_UDP = 0,
- PROTOCOL_TCP = 1,
- };
-
- class EventHandler {
- public:
- virtual ~EventHandler() {}
-
- // Called for each local candidate.
- virtual void OnCandidateReady(const std::string& address) = 0;
-
- // Called when readable of writable state of the stream changes.
- virtual void OnStateChange(State state) = 0;
-
- // Called when an error occures (e.g. TCP handshake
- // failed). P2PTransport object is not usable after that and
- // should be destroyed.
- virtual void OnError(int error) = 0;
- };
-
- struct WEBKIT_GLUE_EXPORT Config {
- Config();
- ~Config();
-
- // STUN server address and port.
- std::string stun_server;
- int stun_server_port;
-
- // Relay server address and port.
- std::string relay_server;
- int relay_server_port;
-
- // Relay server username.
- std::string relay_username;
-
- // Relay server password.
- std::string relay_password;
-
- // When set to true relay is a legacy Google relay (not TURN
- // compliant).
- bool legacy_relay;
-
- // TCP window sizes. Default size is used when set to 0.
- int tcp_receive_window;
- int tcp_send_window;
-
- // Disables Neagle's algorithm when set to true.
- bool tcp_no_delay;
-
- // TCP ACK delay.
- int tcp_ack_delay_ms;
-
- // Disable TCP-based transport when set to true.
- bool disable_tcp_transport;
- };
-
- virtual ~P2PTransport() {}
-
- // Initialize transport using specified configuration. |web_frame|
- // is used to make HTTP requests to relay servers. Returns true
- // if initialization succeeded.
- virtual bool Init(WebKit::WebFrame* web_frame,
- const std::string& name,
- Protocol protocol,
- const Config& config,
- EventHandler* event_handler) = 0;
-
- // Add candidate received from the remote peer. Returns false if the
- // provided address is not in a valid format.
- virtual bool AddRemoteCandidate(const std::string& address) = 0;
-
- // Returns socket interface that can be used to send/receive
- // data. Returned object is owned by the transport. Pending calls on
- // the socket are canceled when the transport is destroyed.
- virtual net::Socket* GetChannel() = 0;
-};
-
-} // namespace webkit_glue
-
-#endif // WEBKIT_GLUE_P2P_TRANSPORT_H_
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.cc ('k') | webkit/glue/p2p_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698