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 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "content/public/browser/content_browser_client.h" | 12 #include "content/public/browser/content_browser_client.h" |
13 | 13 |
14 namespace breakpad { | 14 namespace breakpad { |
15 class CrashHandlerHostLinux; | 15 class CrashHandlerHostLinux; |
16 } | 16 } |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 class BrowserMessageFilter; | 19 class BrowserMessageFilter; |
20 } | 20 } |
21 | 21 |
| 22 namespace net { |
| 23 class HostResolver; |
| 24 } |
| 25 |
22 namespace chromecast { | 26 namespace chromecast { |
23 namespace shell { | 27 namespace shell { |
24 | 28 |
25 class CastBrowserMainParts; | 29 class CastBrowserMainParts; |
26 class URLRequestContextFactory; | 30 class URLRequestContextFactory; |
27 | 31 |
28 class CastContentBrowserClient: public content::ContentBrowserClient { | 32 class CastContentBrowserClient: public content::ContentBrowserClient { |
29 public: | 33 public: |
30 CastContentBrowserClient(); | 34 CastContentBrowserClient(); |
31 ~CastContentBrowserClient() override; | 35 ~CastContentBrowserClient() override; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const base::CommandLine& command_line, | 96 const base::CommandLine& command_line, |
93 int child_process_id, | 97 int child_process_id, |
94 content::FileDescriptorInfo* mappings) override; | 98 content::FileDescriptorInfo* mappings) override; |
95 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) | 99 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) |
96 content::ExternalVideoSurfaceContainer* | 100 content::ExternalVideoSurfaceContainer* |
97 OverrideCreateExternalVideoSurfaceContainer( | 101 OverrideCreateExternalVideoSurfaceContainer( |
98 content::WebContents* web_contents) override; | 102 content::WebContents* web_contents) override; |
99 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) | 103 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) |
100 | 104 |
101 private: | 105 private: |
| 106 void AddNetworkHintsMessageFilter(int render_process_id, |
| 107 net::URLRequestContext* context); |
| 108 |
102 net::X509Certificate* SelectClientCertificateOnIOThread( | 109 net::X509Certificate* SelectClientCertificateOnIOThread( |
103 GURL requesting_url, | 110 GURL requesting_url, |
104 int render_process_id); | 111 int render_process_id); |
105 | 112 |
106 #if !defined(OS_ANDROID) | 113 #if !defined(OS_ANDROID) |
107 // Returns the crash signal FD corresponding to the current process type. | 114 // Returns the crash signal FD corresponding to the current process type. |
108 int GetCrashSignalFD(const base::CommandLine& command_line); | 115 int GetCrashSignalFD(const base::CommandLine& command_line); |
109 | 116 |
110 // Creates a CrashHandlerHost instance for the given process type. | 117 // Creates a CrashHandlerHost instance for the given process type. |
111 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( | 118 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( |
112 const std::string& process_type); | 119 const std::string& process_type); |
113 | 120 |
114 // A static cache to hold crash_handlers for each process_type | 121 // A static cache to hold crash_handlers for each process_type |
115 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; | 122 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; |
116 #endif | 123 #endif |
117 | 124 |
118 base::ScopedFD v8_natives_fd_; | 125 base::ScopedFD v8_natives_fd_; |
119 base::ScopedFD v8_snapshot_fd_; | 126 base::ScopedFD v8_snapshot_fd_; |
120 | 127 |
121 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; | 128 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; |
122 | 129 |
123 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 130 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
124 }; | 131 }; |
125 | 132 |
126 } // namespace shell | 133 } // namespace shell |
127 } // namespace chromecast | 134 } // namespace chromecast |
128 | 135 |
129 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 136 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |