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

Side by Side Diff: chromecast/service/cast_service.h

Issue 613093002: Chromecast: removes CastNetworkDelegate from CastService::Create. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | chromecast/service/cast_service_android.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 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 CHROMECAST_SERVICE_CAST_SERVICE_H_ 5 #ifndef CHROMECAST_SERVICE_CAST_SERVICE_H_
6 #define CHROMECAST_SERVICE_CAST_SERVICE_H_ 6 #define CHROMECAST_SERVICE_CAST_SERVICE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 11
12 namespace base { 12 namespace base {
13 class ThreadChecker; 13 class ThreadChecker;
14 } 14 }
15 15
16 namespace content { 16 namespace content {
17 class BrowserContext; 17 class BrowserContext;
18 } 18 }
19 19
20 namespace net { 20 namespace net {
21 class URLRequestContextGetter; 21 class URLRequestContextGetter;
22 } 22 }
23 23
24 namespace chromecast { 24 namespace chromecast {
25 namespace shell {
26 class CastNetworkDelegate;
27 }
28 25
29 class CastService { 26 class CastService {
30 public: 27 public:
31 // A callback that will be invoked when the user changes the opt-in stats 28 // A callback that will be invoked when the user changes the opt-in stats
32 // value. 29 // value.
33 typedef base::Callback<void(bool)> OptInStatsChangedCallback; 30 typedef base::Callback<void(bool)> OptInStatsChangedCallback;
34 31
35 // Create() takes a separate url request context getter because the request 32 // Create() takes a separate url request context getter because the request
36 // context getter obtained through the browser context might not be 33 // context getter obtained through the browser context might not be
37 // appropriate for the url requests made by the cast service/reciever. 34 // appropriate for the url requests made by the cast service/reciever.
38 // For example, on Chromecast, it is needed to pass in a system url request 35 // For example, on Chromecast, it is needed to pass in a system url request
39 // context getter that would set the request context for NSS, which the main 36 // context getter that would set the request context for NSS, which the main
40 // getter doesn't do. 37 // getter doesn't do.
41 static CastService* Create( 38 static CastService* Create(
42 content::BrowserContext* browser_context, 39 content::BrowserContext* browser_context,
43 net::URLRequestContextGetter* request_context_getter, 40 net::URLRequestContextGetter* request_context_getter,
44 shell::CastNetworkDelegate* network_delegate,
45 const OptInStatsChangedCallback& opt_in_stats_callback); 41 const OptInStatsChangedCallback& opt_in_stats_callback);
46 42
47 virtual ~CastService(); 43 virtual ~CastService();
48 44
49 // Start/stop the cast service. 45 // Start/stop the cast service.
50 void Start(); 46 void Start();
51 void Stop(); 47 void Stop();
52 48
53 protected: 49 protected:
54 CastService(content::BrowserContext* browser_context, 50 CastService(content::BrowserContext* browser_context,
(...skipping 14 matching lines...) Expand all
69 const OptInStatsChangedCallback opt_in_stats_callback_; 65 const OptInStatsChangedCallback opt_in_stats_callback_;
70 bool stopped_; 66 bool stopped_;
71 const scoped_ptr<base::ThreadChecker> thread_checker_; 67 const scoped_ptr<base::ThreadChecker> thread_checker_;
72 68
73 DISALLOW_COPY_AND_ASSIGN(CastService); 69 DISALLOW_COPY_AND_ASSIGN(CastService);
74 }; 70 };
75 71
76 } // namespace chromecast 72 } // namespace chromecast
77 73
78 #endif // CHROMECAST_SERVICE_CAST_SERVICE_H_ 74 #endif // CHROMECAST_SERVICE_CAST_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chromecast/service/cast_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698