| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "content/public/browser/resource_dispatcher_host.h" | 44 #include "content/public/browser/resource_dispatcher_host.h" |
| 45 #include "content/public/browser/web_contents.h" | 45 #include "content/public/browser/web_contents.h" |
| 46 #include "content/public/common/content_descriptors.h" | 46 #include "content/public/common/content_descriptors.h" |
| 47 #include "content/public/common/content_switches.h" | 47 #include "content/public/common/content_switches.h" |
| 48 #include "content/public/common/url_constants.h" | 48 #include "content/public/common/url_constants.h" |
| 49 #include "content/public/common/web_preferences.h" | 49 #include "content/public/common/web_preferences.h" |
| 50 #include "net/ssl/ssl_cert_request_info.h" | 50 #include "net/ssl/ssl_cert_request_info.h" |
| 51 #include "net/url_request/url_request_context_getter.h" | 51 #include "net/url_request/url_request_context_getter.h" |
| 52 #include "ui/gl/gl_switches.h" | 52 #include "ui/gl/gl_switches.h" |
| 53 | 53 |
| 54 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 55 #include "chromecast/media/mojo/cast_media_application.h" |
| 56 #endif // ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS |
| 57 |
| 54 #if defined(OS_ANDROID) | 58 #if defined(OS_ANDROID) |
| 55 #include "components/crash/content/browser/crash_dump_manager_android.h" | 59 #include "components/crash/content/browser/crash_dump_manager_android.h" |
| 56 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" | 60 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" |
| 57 #else | 61 #else |
| 58 #include "chromecast/browser/media/cast_browser_cdm_factory.h" | 62 #include "chromecast/browser/media/cast_browser_cdm_factory.h" |
| 59 #endif // defined(OS_ANDROID) | 63 #endif // defined(OS_ANDROID) |
| 60 | 64 |
| 61 namespace chromecast { | 65 namespace chromecast { |
| 62 namespace shell { | 66 namespace shell { |
| 63 | 67 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 bool opener_suppressed, | 346 bool opener_suppressed, |
| 343 content::ResourceContext* context, | 347 content::ResourceContext* context, |
| 344 int render_process_id, | 348 int render_process_id, |
| 345 int opener_render_view_id, | 349 int opener_render_view_id, |
| 346 int opener_render_frame_id, | 350 int opener_render_frame_id, |
| 347 bool* no_javascript_access) { | 351 bool* no_javascript_access) { |
| 348 *no_javascript_access = true; | 352 *no_javascript_access = true; |
| 349 return false; | 353 return false; |
| 350 } | 354 } |
| 351 | 355 |
| 352 void CastContentBrowserClient::RegisterUnsandboxedOutOfProcessMojoApplications( | 356 void CastContentBrowserClient::RegisterInProcessMojoApplications( |
| 353 std::map<GURL, base::string16>* apps) { | 357 StaticMojoApplicationMap* apps) { |
| 354 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) | 358 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 355 apps->insert(std::make_pair(GURL("mojo:media"), | 359 apps->insert(std::make_pair( |
| 356 base::ASCIIToUTF16("Media App"))); | 360 GURL("mojo:media"), base::Bind(&media::CastMediaApplication::CreateApp))); |
| 357 #endif | 361 #endif |
| 358 } | 362 } |
| 359 | 363 |
| 360 #if defined(OS_ANDROID) | 364 #if defined(OS_ANDROID) |
| 361 | 365 |
| 362 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 366 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 363 const base::CommandLine& command_line, | 367 const base::CommandLine& command_line, |
| 364 int child_process_id, | 368 int child_process_id, |
| 365 content::FileDescriptorInfo* mappings, | 369 content::FileDescriptorInfo* mappings, |
| 366 std::map<int, base::MemoryMappedFile::Region>* regions) { | 370 std::map<int, base::MemoryMappedFile::Region>* regions) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 process_type, dumps_path, false /* upload */); | 460 process_type, dumps_path, false /* upload */); |
| 457 // StartUploaderThread() even though upload is diferred. | 461 // StartUploaderThread() even though upload is diferred. |
| 458 // Breakpad-related memory is freed in the uploader thread. | 462 // Breakpad-related memory is freed in the uploader thread. |
| 459 crash_handler->StartUploaderThread(); | 463 crash_handler->StartUploaderThread(); |
| 460 return crash_handler; | 464 return crash_handler; |
| 461 } | 465 } |
| 462 #endif // !defined(OS_ANDROID) | 466 #endif // !defined(OS_ANDROID) |
| 463 | 467 |
| 464 } // namespace shell | 468 } // namespace shell |
| 465 } // namespace chromecast | 469 } // namespace chromecast |
| OLD | NEW |