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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 namespace chromecast { | 65 namespace chromecast { |
66 namespace shell { | 66 namespace shell { |
67 | 67 |
68 namespace { | 68 namespace { |
69 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 69 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
70 static scoped_ptr<mojo::ShellClient> CreateCastMojoMediaApplication( | 70 static scoped_ptr<mojo::ShellClient> CreateCastMojoMediaApplication( |
71 CastContentBrowserClient* browser_client) { | 71 CastContentBrowserClient* browser_client) { |
72 scoped_ptr<::media::MojoMediaClient> mojo_media_client( | 72 scoped_ptr<::media::MojoMediaClient> mojo_media_client( |
73 new media::CastMojoMediaClient( | 73 new media::CastMojoMediaClient( |
74 browser_client->GetCmaMediaPipelineClient())); | 74 base::Bind(&CastContentBrowserClient::CreateMediaPipelineBackend, |
| 75 base::Unretained(browser_client)))); |
75 return scoped_ptr<mojo::ShellClient>( | 76 return scoped_ptr<mojo::ShellClient>( |
76 new ::media::MojoMediaApplication(std::move(mojo_media_client))); | 77 new ::media::MojoMediaApplication(std::move(mojo_media_client))); |
77 } | 78 } |
78 #endif // ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS | 79 #endif // ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS |
79 } // namespace | 80 } // namespace |
80 | 81 |
81 CastContentBrowserClient::CastContentBrowserClient() | 82 CastContentBrowserClient::CastContentBrowserClient() |
82 : cast_browser_main_parts_(nullptr), | 83 : cast_browser_main_parts_(nullptr), |
83 url_request_context_factory_(new URLRequestContextFactory()) {} | 84 url_request_context_factory_(new URLRequestContextFactory()) {} |
84 | 85 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 process_type, dumps_path, false /* upload */); | 491 process_type, dumps_path, false /* upload */); |
491 // StartUploaderThread() even though upload is diferred. | 492 // StartUploaderThread() even though upload is diferred. |
492 // Breakpad-related memory is freed in the uploader thread. | 493 // Breakpad-related memory is freed in the uploader thread. |
493 crash_handler->StartUploaderThread(); | 494 crash_handler->StartUploaderThread(); |
494 return crash_handler; | 495 return crash_handler; |
495 } | 496 } |
496 #endif // !defined(OS_ANDROID) | 497 #endif // !defined(OS_ANDROID) |
497 | 498 |
498 } // namespace shell | 499 } // namespace shell |
499 } // namespace chromecast | 500 } // namespace chromecast |
OLD | NEW |