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

Unified Diff: extensions/browser/api/cast_channel/cast_channel_api.h

Issue 555283002: Create new class "CastTransport", which encapsulates the message read and write event loops. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Used %u instead of %zu for printf format string (%zu crashed Windows) Created 6 years, 3 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 | « extensions/browser/BUILD.gn ('k') | extensions/browser/api/cast_channel/cast_channel_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/cast_channel/cast_channel_api.h
diff --git a/extensions/browser/api/cast_channel/cast_channel_api.h b/extensions/browser/api/cast_channel/cast_channel_api.h
index ebb3173a54e97c02d9f1877b25df8fc3bf126bb9..32a8cc0f152e8fd76a19f86c6a0521d0f6134a34 100644
--- a/extensions/browser/api/cast_channel/cast_channel_api.h
+++ b/extensions/browser/api/cast_channel/cast_channel_api.h
@@ -48,17 +48,10 @@ class CastChannelAPI : public BrowserContextKeyedAPI,
// BrowserContextKeyedAPI implementation.
static BrowserContextKeyedAPIFactory<CastChannelAPI>* GetFactoryInstance();
- // Returns a new CastSocket that connects to |ip_endpoint| with authentication
- // |channel_auth| and is to be owned by |extension_id|.
- scoped_ptr<cast_channel::CastSocket> CreateCastSocket(
- const std::string& extension_id,
- const net::IPEndPoint& ip_endpoint,
- cast_channel::ChannelAuthType channel_auth,
- const base::TimeDelta& timeout);
-
// Returns a pointer to the Logger member variable.
// TODO(imcheng): Consider whether it is possible for this class to own the
- // CastSockets and make this class the sole owner of Logger. Alternatively,
+ // CastSockets and make this class the sole owner of Logger.
+ // Alternatively,
// consider making Logger not ref-counted by passing a weak
// reference of Logger to the CastSockets instead.
scoped_refptr<cast_channel::Logger> GetLogger();
@@ -67,6 +60,10 @@ class CastChannelAPI : public BrowserContextKeyedAPI,
// testing.
void SetSocketForTest(scoped_ptr<cast_channel::CastSocket> socket_for_test);
+ // Returns a test CastSocket instance, if it is defined.
+ // Otherwise returns a scoped_ptr with a NULL ptr value.
+ scoped_ptr<cast_channel::CastSocket> GetSocketForTest();
+
private:
friend class BrowserContextKeyedAPIFactory<CastChannelAPI>;
friend class ::CastChannelAPITest;
« no previous file with comments | « extensions/browser/BUILD.gn ('k') | extensions/browser/api/cast_channel/cast_channel_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698