Chromium Code Reviews| 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 // nogncheck because of conditional dependency. | |
| 56 #include "media/mojo/services/mojo_media_application.h" // nogncheck | |
|
xhwang
2016/02/02 20:25:16
cool with "nogncheck" :)
alokp
2016/02/02 20:37:00
this is a common pattern in GN for conditional dep
| |
| 57 #endif // ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS | |
| 58 | |
| 54 #if defined(OS_ANDROID) | 59 #if defined(OS_ANDROID) |
| 55 #include "components/crash/content/browser/crash_dump_manager_android.h" | 60 #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" | 61 #include "components/external_video_surface/browser/android/external_video_surfa ce_container_impl.h" |
| 57 #else | 62 #else |
| 58 #include "chromecast/browser/media/cast_browser_cdm_factory.h" | 63 #include "chromecast/browser/media/cast_browser_cdm_factory.h" |
| 59 #endif // defined(OS_ANDROID) | 64 #endif // defined(OS_ANDROID) |
| 60 | 65 |
| 61 namespace chromecast { | 66 namespace chromecast { |
| 62 namespace shell { | 67 namespace shell { |
| 63 | 68 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 342 bool opener_suppressed, | 347 bool opener_suppressed, |
| 343 content::ResourceContext* context, | 348 content::ResourceContext* context, |
| 344 int render_process_id, | 349 int render_process_id, |
| 345 int opener_render_view_id, | 350 int opener_render_view_id, |
| 346 int opener_render_frame_id, | 351 int opener_render_frame_id, |
| 347 bool* no_javascript_access) { | 352 bool* no_javascript_access) { |
| 348 *no_javascript_access = true; | 353 *no_javascript_access = true; |
| 349 return false; | 354 return false; |
| 350 } | 355 } |
| 351 | 356 |
| 352 void CastContentBrowserClient::RegisterUnsandboxedOutOfProcessMojoApplications( | 357 void CastContentBrowserClient::RegisterInProcessMojoApplications( |
| 353 std::map<GURL, base::string16>* apps) { | 358 StaticMojoApplicationMap* apps) { |
| 354 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) | 359 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 355 apps->insert(std::make_pair(GURL("mojo:media"), | 360 apps->insert( |
| 356 base::ASCIIToUTF16("Media App"))); | 361 std::make_pair(GURL("mojo:media"), |
| 362 base::Bind(::media::MojoMediaApplication::CreateApp))); | |
| 357 #endif | 363 #endif |
| 358 } | 364 } |
| 359 | 365 |
| 360 #if defined(OS_ANDROID) | 366 #if defined(OS_ANDROID) |
| 361 | 367 |
| 362 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 368 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 363 const base::CommandLine& command_line, | 369 const base::CommandLine& command_line, |
| 364 int child_process_id, | 370 int child_process_id, |
| 365 content::FileDescriptorInfo* mappings, | 371 content::FileDescriptorInfo* mappings, |
| 366 std::map<int, base::MemoryMappedFile::Region>* regions) { | 372 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 */); | 462 process_type, dumps_path, false /* upload */); |
| 457 // StartUploaderThread() even though upload is diferred. | 463 // StartUploaderThread() even though upload is diferred. |
| 458 // Breakpad-related memory is freed in the uploader thread. | 464 // Breakpad-related memory is freed in the uploader thread. |
| 459 crash_handler->StartUploaderThread(); | 465 crash_handler->StartUploaderThread(); |
| 460 return crash_handler; | 466 return crash_handler; |
| 461 } | 467 } |
| 462 #endif // !defined(OS_ANDROID) | 468 #endif // !defined(OS_ANDROID) |
| 463 | 469 |
| 464 } // namespace shell | 470 } // namespace shell |
| 465 } // namespace chromecast | 471 } // namespace chromecast |
| OLD | NEW |