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" |
(...skipping 26 matching lines...) Loading... |
37 #include "content/public/common/content_switches.h" | 37 #include "content/public/common/content_switches.h" |
38 #include "content/public/common/url_constants.h" | 38 #include "content/public/common/url_constants.h" |
39 #include "content/public/common/web_preferences.h" | 39 #include "content/public/common/web_preferences.h" |
40 #include "gin/v8_initializer.h" | 40 #include "gin/v8_initializer.h" |
41 #include "media/audio/audio_manager_factory.h" | 41 #include "media/audio/audio_manager_factory.h" |
42 #include "net/ssl/ssl_cert_request_info.h" | 42 #include "net/ssl/ssl_cert_request_info.h" |
43 #include "net/url_request/url_request_context_getter.h" | 43 #include "net/url_request/url_request_context_getter.h" |
44 #include "ui/gl/gl_switches.h" | 44 #include "ui/gl/gl_switches.h" |
45 | 45 |
46 #if defined(OS_ANDROID) | 46 #if defined(OS_ANDROID) |
47 #include "chromecast/browser/android/external_video_surface_container_impl.h" | |
48 #include "components/crash/browser/crash_dump_manager_android.h" | 47 #include "components/crash/browser/crash_dump_manager_android.h" |
| 48 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" |
49 #endif // defined(OS_ANDROID) | 49 #endif // defined(OS_ANDROID) |
50 | 50 |
51 namespace chromecast { | 51 namespace chromecast { |
52 namespace shell { | 52 namespace shell { |
53 | 53 |
54 CastContentBrowserClient::CastContentBrowserClient() | 54 CastContentBrowserClient::CastContentBrowserClient() |
55 : v8_natives_fd_(-1), | 55 : v8_natives_fd_(-1), |
56 v8_snapshot_fd_(-1), | 56 v8_snapshot_fd_(-1), |
57 url_request_context_factory_(new URLRequestContextFactory()) { | 57 url_request_context_factory_(new URLRequestContextFactory()) { |
58 } | 58 } |
(...skipping 309 matching lines...) Loading... |
368 if (crash_signal_fd >= 0) { | 368 if (crash_signal_fd >= 0) { |
369 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 369 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
370 } | 370 } |
371 #endif // defined(OS_ANDROID) | 371 #endif // defined(OS_ANDROID) |
372 } | 372 } |
373 | 373 |
374 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) | 374 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) |
375 content::ExternalVideoSurfaceContainer* | 375 content::ExternalVideoSurfaceContainer* |
376 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 376 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
377 content::WebContents* web_contents) { | 377 content::WebContents* web_contents) { |
378 return ExternalVideoSurfaceContainerImpl::Create(web_contents); | 378 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
| 379 web_contents); |
379 } | 380 } |
380 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) | 381 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) |
381 | 382 |
382 #if !defined(OS_ANDROID) | 383 #if !defined(OS_ANDROID) |
383 int CastContentBrowserClient::GetCrashSignalFD( | 384 int CastContentBrowserClient::GetCrashSignalFD( |
384 const base::CommandLine& command_line) { | 385 const base::CommandLine& command_line) { |
385 std::string process_type = | 386 std::string process_type = |
386 command_line.GetSwitchValueASCII(switches::kProcessType); | 387 command_line.GetSwitchValueASCII(switches::kProcessType); |
387 | 388 |
388 if (process_type == switches::kRendererProcess || | 389 if (process_type == switches::kRendererProcess || |
(...skipping 24 matching lines...) Loading... |
413 process_type, dumps_path, false /* upload */); | 414 process_type, dumps_path, false /* upload */); |
414 // StartUploaderThread() even though upload is diferred. | 415 // StartUploaderThread() even though upload is diferred. |
415 // Breakpad-related memory is freed in the uploader thread. | 416 // Breakpad-related memory is freed in the uploader thread. |
416 crash_handler->StartUploaderThread(); | 417 crash_handler->StartUploaderThread(); |
417 return crash_handler; | 418 return crash_handler; |
418 } | 419 } |
419 #endif // !defined(OS_ANDROID) | 420 #endif // !defined(OS_ANDROID) |
420 | 421 |
421 } // namespace shell | 422 } // namespace shell |
422 } // namespace chromecast | 423 } // namespace chromecast |
OLD | NEW |