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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "content/public/browser/content_browser_client.h" | 14 #include "content/public/browser/content_browser_client.h" |
| 15 #include "gin/v8_initializer.h" |
15 | 16 |
16 namespace breakpad { | 17 namespace breakpad { |
17 class CrashHandlerHostLinux; | 18 class CrashHandlerHostLinux; |
18 } | 19 } |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 class BrowserMessageFilter; | 22 class BrowserMessageFilter; |
22 } | 23 } |
23 | 24 |
24 namespace media { | 25 namespace media { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 int GetCrashSignalFD(const base::CommandLine& command_line); | 147 int GetCrashSignalFD(const base::CommandLine& command_line); |
147 | 148 |
148 // Creates a CrashHandlerHost instance for the given process type. | 149 // Creates a CrashHandlerHost instance for the given process type. |
149 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( | 150 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( |
150 const std::string& process_type); | 151 const std::string& process_type); |
151 | 152 |
152 // A static cache to hold crash_handlers for each process_type | 153 // A static cache to hold crash_handlers for each process_type |
153 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; | 154 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; |
154 #endif | 155 #endif |
155 | 156 |
156 base::ScopedFD v8_natives_fd_; | 157 gin::V8Initializer::V8Files v8_files_; |
157 base::ScopedFD v8_snapshot_fd_; | |
158 bool natives_fd_exists() { return v8_natives_fd_ != -1; } | |
159 bool snapshot_fd_exists() { return v8_snapshot_fd_ != -1; } | |
160 | 158 |
161 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; | 159 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; |
162 | 160 |
163 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); | 161 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
164 }; | 162 }; |
165 | 163 |
166 } // namespace shell | 164 } // namespace shell |
167 } // namespace chromecast | 165 } // namespace chromecast |
168 | 166 |
169 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ | 167 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |