OLD | NEW |
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_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
6 #define CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 6 #define CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 10 matching lines...) Expand all Loading... |
21 } | 21 } |
22 | 22 |
23 namespace media { | 23 namespace media { |
24 class BrowserCdmFactory; | 24 class BrowserCdmFactory; |
25 } | 25 } |
26 | 26 |
27 namespace metrics { | 27 namespace metrics { |
28 class MetricsService; | 28 class MetricsService; |
29 } | 29 } |
30 | 30 |
| 31 namespace network_hints { |
| 32 class NetworkHintsImpl; |
| 33 } |
| 34 |
31 namespace chromecast { | 35 namespace chromecast { |
32 class CastService; | 36 class CastService; |
33 | 37 |
34 namespace media { | 38 namespace media { |
35 class MediaPipelineBackend; | 39 class MediaPipelineBackend; |
36 class MediaPipelineBackendManager; | 40 class MediaPipelineBackendManager; |
37 struct MediaPipelineDeviceParams; | 41 struct MediaPipelineDeviceParams; |
38 class MediaResourceTracker; | 42 class MediaResourceTracker; |
39 class VideoPlaneController; | 43 class VideoPlaneController; |
40 } | 44 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) | 167 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) |
164 | 168 |
165 protected: | 169 protected: |
166 CastContentBrowserClient(); | 170 CastContentBrowserClient(); |
167 | 171 |
168 URLRequestContextFactory* url_request_context_factory() const { | 172 URLRequestContextFactory* url_request_context_factory() const { |
169 return url_request_context_factory_.get(); | 173 return url_request_context_factory_.get(); |
170 } | 174 } |
171 | 175 |
172 private: | 176 private: |
173 void AddNetworkHintsMessageFilter(int render_process_id, | 177 void AddNetworkHintsImpl(int render_process_id, |
174 net::URLRequestContext* context); | 178 net::URLRequestContext* context); |
175 | 179 |
176 net::X509Certificate* SelectClientCertificateOnIOThread( | 180 net::X509Certificate* SelectClientCertificateOnIOThread( |
177 GURL requesting_url, | 181 GURL requesting_url, |
178 int render_process_id); | 182 int render_process_id); |
179 | 183 |
180 #if !defined(OS_ANDROID) | 184 #if !defined(OS_ANDROID) |
181 // Returns the crash signal FD corresponding to the current process type. | 185 // Returns the crash signal FD corresponding to the current process type. |
182 int GetCrashSignalFD(const base::CommandLine& command_line); | 186 int GetCrashSignalFD(const base::CommandLine& command_line); |
183 | 187 |
184 // Creates a CrashHandlerHost instance for the given process type. | 188 // Creates a CrashHandlerHost instance for the given process type. |
185 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( | 189 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( |
186 const std::string& process_type); | 190 const std::string& process_type); |
187 | 191 |
188 // A static cache to hold crash_handlers for each process_type | 192 // A static cache to hold crash_handlers for each process_type |
189 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; | 193 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; |
190 #endif // !defined(OS_ANDROID) | 194 #endif // !defined(OS_ANDROID) |
191 | 195 |
192 // Created by CastContentBrowserClient but owned by BrowserMainLoop. | 196 // Created by CastContentBrowserClient but owned by BrowserMainLoop. |
193 CastBrowserMainParts* cast_browser_main_parts_; | 197 CastBrowserMainParts* cast_browser_main_parts_; |
194 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; | 198 std::unique_ptr<URLRequestContextFactory> url_request_context_factory_; |
195 | 199 |
| 200 std::unique_ptr<network_hints::NetworkHintsImpl> network_hints_; |
| 201 |
196 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 202 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
197 }; | 203 }; |
198 | 204 |
199 } // namespace shell | 205 } // namespace shell |
200 } // namespace chromecast | 206 } // namespace chromecast |
201 | 207 |
202 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 208 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |