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 #include "chromecast/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/files/scoped_file.h" | 11 #include "base/files/scoped_file.h" |
12 #include "base/i18n/icu_util.h" | 12 #include "base/i18n/icu_util.h" |
13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "chromecast/base/cast_paths.h" | 15 #include "chromecast/base/cast_paths.h" |
16 #include "chromecast/browser/cast_browser_context.h" | 16 #include "chromecast/browser/cast_browser_context.h" |
17 #include "chromecast/browser/cast_browser_main_parts.h" | 17 #include "chromecast/browser/cast_browser_main_parts.h" |
18 #include "chromecast/browser/cast_browser_process.h" | 18 #include "chromecast/browser/cast_browser_process.h" |
19 #include "chromecast/browser/cast_network_delegate.h" | 19 #include "chromecast/browser/cast_network_delegate.h" |
20 #include "chromecast/browser/cast_quota_permission_context.h" | 20 #include "chromecast/browser/cast_quota_permission_context.h" |
21 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" | 21 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" |
22 #include "chromecast/browser/devtools/cast_dev_tools_delegate.h" | |
23 #include "chromecast/browser/geolocation/cast_access_token_store.h" | 22 #include "chromecast/browser/geolocation/cast_access_token_store.h" |
24 #include "chromecast/browser/media/cma_message_filter_host.h" | 23 #include "chromecast/browser/media/cma_message_filter_host.h" |
25 #include "chromecast/browser/url_request_context_factory.h" | 24 #include "chromecast/browser/url_request_context_factory.h" |
26 #include "chromecast/common/chromecast_switches.h" | 25 #include "chromecast/common/chromecast_switches.h" |
27 #include "chromecast/common/global_descriptors.h" | 26 #include "chromecast/common/global_descriptors.h" |
28 #include "components/crash/app/breakpad_linux.h" | 27 #include "components/crash/app/breakpad_linux.h" |
29 #include "components/crash/browser/crash_handler_host_linux.h" | 28 #include "components/crash/browser/crash_handler_host_linux.h" |
30 #include "components/network_hints/browser/network_hints_message_filter.h" | 29 #include "components/network_hints/browser/network_hints_message_filter.h" |
31 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
32 #include "content/public/browser/certificate_request_result_type.h" | 31 #include "content/public/browser/certificate_request_result_type.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 bool user_gesture, | 305 bool user_gesture, |
307 bool opener_suppressed, | 306 bool opener_suppressed, |
308 content::ResourceContext* context, | 307 content::ResourceContext* context, |
309 int render_process_id, | 308 int render_process_id, |
310 int opener_id, | 309 int opener_id, |
311 bool* no_javascript_access) { | 310 bool* no_javascript_access) { |
312 *no_javascript_access = true; | 311 *no_javascript_access = true; |
313 return false; | 312 return false; |
314 } | 313 } |
315 | 314 |
316 content::DevToolsManagerDelegate* | |
317 CastContentBrowserClient::GetDevToolsManagerDelegate() { | |
318 return new CastDevToolsManagerDelegate(); | |
319 } | |
320 | |
321 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 315 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
322 const base::CommandLine& command_line, | 316 const base::CommandLine& command_line, |
323 int child_process_id, | 317 int child_process_id, |
324 content::FileDescriptorInfo* mappings) { | 318 content::FileDescriptorInfo* mappings) { |
325 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) | 319 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) |
326 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { | 320 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { |
327 int v8_natives_fd = -1; | 321 int v8_natives_fd = -1; |
328 int v8_snapshot_fd = -1; | 322 int v8_snapshot_fd = -1; |
329 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, | 323 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, |
330 &v8_snapshot_fd)) { | 324 &v8_snapshot_fd)) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 process_type, dumps_path, false /* upload */); | 414 process_type, dumps_path, false /* upload */); |
421 // StartUploaderThread() even though upload is diferred. | 415 // StartUploaderThread() even though upload is diferred. |
422 // Breakpad-related memory is freed in the uploader thread. | 416 // Breakpad-related memory is freed in the uploader thread. |
423 crash_handler->StartUploaderThread(); | 417 crash_handler->StartUploaderThread(); |
424 return crash_handler; | 418 return crash_handler; |
425 } | 419 } |
426 #endif // !defined(OS_ANDROID) | 420 #endif // !defined(OS_ANDROID) |
427 | 421 |
428 } // namespace shell | 422 } // namespace shell |
429 } // namespace chromecast | 423 } // namespace chromecast |
OLD | NEW |