Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1697233002: Reland of land "media: Refactor MojoMediaClient" with fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chromecast/media/mojo/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) 54 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
55 #include "chromecast/media/mojo/cast_mojo_media_client.h"
55 // nogncheck because of conditional dependency. 56 // nogncheck because of conditional dependency.
56 #include "media/mojo/services/mojo_media_application.h" // nogncheck 57 #include "media/mojo/services/mojo_media_application.h" // nogncheck
57 #endif // ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS 58 #endif // ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS
58 59
59 #if defined(OS_ANDROID) 60 #if defined(OS_ANDROID)
60 #include "components/crash/content/browser/crash_dump_manager_android.h" 61 #include "components/crash/content/browser/crash_dump_manager_android.h"
61 #include "components/external_video_surface/browser/android/external_video_surfa ce_container_impl.h" 62 #include "components/external_video_surface/browser/android/external_video_surfa ce_container_impl.h"
62 #else 63 #else
63 #include "chromecast/browser/media/cast_browser_cdm_factory.h" 64 #include "chromecast/browser/media/cast_browser_cdm_factory.h"
64 #endif // defined(OS_ANDROID) 65 #endif // defined(OS_ANDROID)
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 int opener_render_view_id, 351 int opener_render_view_id,
351 int opener_render_frame_id, 352 int opener_render_frame_id,
352 bool* no_javascript_access) { 353 bool* no_javascript_access) {
353 *no_javascript_access = true; 354 *no_javascript_access = true;
354 return false; 355 return false;
355 } 356 }
356 357
357 void CastContentBrowserClient::RegisterInProcessMojoApplications( 358 void CastContentBrowserClient::RegisterInProcessMojoApplications(
358 StaticMojoApplicationMap* apps) { 359 StaticMojoApplicationMap* apps) {
359 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 360 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
360 apps->insert( 361 apps->insert(std::make_pair(
361 std::make_pair(GURL("mojo:media"), 362 GURL("mojo:media"),
362 base::Bind(::media::MojoMediaApplication::CreateApp))); 363 base::Bind(::media::MojoMediaApplication::CreateAppWithClient,
364 base::Bind(&media::CastMojoMediaClient::Create))));
363 #endif 365 #endif
364 } 366 }
365 367
366 #if defined(OS_ANDROID) 368 #if defined(OS_ANDROID)
367 369
368 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 370 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
369 const base::CommandLine& command_line, 371 const base::CommandLine& command_line,
370 int child_process_id, 372 int child_process_id,
371 content::FileDescriptorInfo* mappings, 373 content::FileDescriptorInfo* mappings,
372 std::map<int, base::MemoryMappedFile::Region>* regions) { 374 std::map<int, base::MemoryMappedFile::Region>* regions) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 process_type, dumps_path, false /* upload */); 464 process_type, dumps_path, false /* upload */);
463 // StartUploaderThread() even though upload is diferred. 465 // StartUploaderThread() even though upload is diferred.
464 // Breakpad-related memory is freed in the uploader thread. 466 // Breakpad-related memory is freed in the uploader thread.
465 crash_handler->StartUploaderThread(); 467 crash_handler->StartUploaderThread();
466 return crash_handler; 468 return crash_handler;
467 } 469 }
468 #endif // !defined(OS_ANDROID) 470 #endif // !defined(OS_ANDROID)
469 471
470 } // namespace shell 472 } // namespace shell
471 } // namespace chromecast 473 } // namespace chromecast
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chromecast/media/mojo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698