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

Side by Side Diff: chrome/browser/extensions/api/cast_channel/cast_channel_api.h

Issue 393023003: Added connection timeout functionality to CastSocket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing initializer for CastSocket unit tests. Created 6 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/cast_channel/cast_channel_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 static CastChannelAPI* Get(content::BrowserContext* context); 39 static CastChannelAPI* Get(content::BrowserContext* context);
40 40
41 // BrowserContextKeyedAPI implementation. 41 // BrowserContextKeyedAPI implementation.
42 static BrowserContextKeyedAPIFactory<CastChannelAPI>* GetFactoryInstance(); 42 static BrowserContextKeyedAPIFactory<CastChannelAPI>* GetFactoryInstance();
43 43
44 // Returns a new CastSocket that connects to |ip_endpoint| with authentication 44 // Returns a new CastSocket that connects to |ip_endpoint| with authentication
45 // |channel_auth| and is to be owned by |extension_id|. 45 // |channel_auth| and is to be owned by |extension_id|.
46 scoped_ptr<cast_channel::CastSocket> CreateCastSocket( 46 scoped_ptr<cast_channel::CastSocket> CreateCastSocket(
47 const std::string& extension_id, 47 const std::string& extension_id,
48 const net::IPEndPoint& ip_endpoint, 48 const net::IPEndPoint& ip_endpoint,
49 cast_channel::ChannelAuthType channel_auth); 49 cast_channel::ChannelAuthType channel_auth,
50 const base::TimeDelta& timeout);
50 51
51 // Sets the CastSocket instance to be returned by CreateCastSocket for 52 // Sets the CastSocket instance to be returned by CreateCastSocket for
52 // testing. 53 // testing.
53 void SetSocketForTest(scoped_ptr<cast_channel::CastSocket> socket_for_test); 54 void SetSocketForTest(scoped_ptr<cast_channel::CastSocket> socket_for_test);
54 55
55 private: 56 private:
56 friend class BrowserContextKeyedAPIFactory<CastChannelAPI>; 57 friend class BrowserContextKeyedAPIFactory<CastChannelAPI>;
57 friend class ::CastChannelAPITest; 58 friend class ::CastChannelAPITest;
58 59
59 virtual ~CastChannelAPI(); 60 virtual ~CastChannelAPI();
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void OnClose(int result); 199 void OnClose(int result);
199 200
200 scoped_ptr<cast_channel::Close::Params> params_; 201 scoped_ptr<cast_channel::Close::Params> params_;
201 202
202 DISALLOW_COPY_AND_ASSIGN(CastChannelCloseFunction); 203 DISALLOW_COPY_AND_ASSIGN(CastChannelCloseFunction);
203 }; 204 };
204 205
205 } // namespace extensions 206 } // namespace extensions
206 207
207 #endif // CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ 208 #endif // CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_CHANNEL_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/cast_channel/cast_channel_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698