Index: extensions/browser/api/cast_channel/cast_socket.h |
diff --git a/extensions/browser/api/cast_channel/cast_socket.h b/extensions/browser/api/cast_channel/cast_socket.h |
index cfff93f301621f94a7afb7b4ac455d72e5048abf..4ee3683d314dcfb20a54ad56cbf528aa116dbace 100644 |
--- a/extensions/browser/api/cast_channel/cast_socket.h |
+++ b/extensions/browser/api/cast_channel/cast_socket.h |
@@ -16,8 +16,6 @@ |
#include "base/memory/ref_counted.h" |
#include "base/threading/thread_checker.h" |
#include "base/timer/timer.h" |
-#include "extensions/browser/api/api_resource.h" |
-#include "extensions/browser/api/api_resource_manager.h" |
#include "extensions/browser/api/cast_channel/cast_auth_util.h" |
#include "extensions/browser/api/cast_channel/cast_socket.h" |
#include "extensions/browser/api/cast_channel/cast_transport.h" |
@@ -58,13 +56,9 @@ enum CastDeviceCapability { |
}; |
// Public interface of the CastSocket class. |
-class CastSocket : public ApiResource { |
+class CastSocket { |
public: |
- explicit CastSocket(const std::string& owner_extension_id); |
- ~CastSocket() override {} |
- |
- // Used by BrowserContextKeyedAPIFactory. |
- static const char* service_name() { return "CastSocketImplManager"; } |
+ virtual ~CastSocket() {} |
// Connects the channel to the peer. If successful, the channel will be in |
// READY_STATE_OPEN. DO NOT delete the CastSocket object in |callback|. |
@@ -88,10 +82,10 @@ class CastSocket : public ApiResource { |
// The IP endpoint for the destination of the channel. |
virtual const net::IPEndPoint& ip_endpoint() const = 0; |
- // Channel id generated by the ApiResourceManager. |
+ // Channel id generated by the CastChannelService. |
virtual int id() const = 0; |
- // Sets the channel id generated by ApiResourceManager. |
+ // Sets the channel id generated by CastChannelService. |
virtual void set_id(int id) = 0; |
// The authentication level requested for the channel. |
@@ -121,12 +115,6 @@ class CastSocket : public ApiResource { |
// Returns a pointer to the socket's message transport layer. Can be used to |
// send and receive CastMessages over the socket. |
virtual CastTransport* transport() const = 0; |
- |
- // Tells the ApiResourceManager to retain CastSocket objects even |
- // if their corresponding extension is suspended. |
- // (CastSockets are still deleted if the extension is removed entirely from |
- // the browser.) |
- bool IsPersistent() const override; |
}; |
// This class implements a channel between Chrome and a Cast device using a TCP |
@@ -186,9 +174,6 @@ class CastSocketImpl : public CastSocket { |
bool keep_alive() const override; |
bool audio_only() const override; |
- // Required by ApiResourceManager. |
- static const char* service_name() { return "CastSocketManager"; } |
- |
protected: |
// CastTransport::Delegate methods for receiving handshake messages. |
class AuthTransportDelegate : public CastTransport::Delegate { |
@@ -229,7 +214,6 @@ class CastSocketImpl : public CastSocket { |
FRIEND_TEST_ALL_PREFIXES(CastSocketTest, |
TestConnectChallengeVerificationFails); |
friend class AuthTransportDelegate; |
- friend class ApiResourceManager<CastSocketImpl>; |
friend class CastSocketTest; |
friend class TestCastSocket; |
@@ -305,7 +289,6 @@ class CastSocketImpl : public CastSocket { |
base::ThreadChecker thread_checker_; |
- const std::string owner_extension_id_; |
// The id of the channel. |
int channel_id_; |
// The IP endpoint that the the channel is connected to. |