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_browser_main_parts.h" | 5 #include "chromecast/browser/cast_browser_main_parts.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
10 #include "chromecast/base/metrics/cast_metrics_helper.h" | 10 #include "chromecast/base/metrics/cast_metrics_helper.h" |
11 #include "chromecast/browser/cast_browser_context.h" | 11 #include "chromecast/browser/cast_browser_context.h" |
12 #include "chromecast/browser/cast_browser_process.h" | 12 #include "chromecast/browser/cast_browser_process.h" |
13 #include "chromecast/browser/devtools/remote_debugging_server.h" | 13 #include "chromecast/browser/devtools/remote_debugging_server.h" |
14 #include "chromecast/browser/metrics/cast_metrics_prefs.h" | 14 #include "chromecast/browser/metrics/cast_metrics_prefs.h" |
15 #include "chromecast/browser/metrics/cast_metrics_service_client.h" | 15 #include "chromecast/browser/metrics/cast_metrics_service_client.h" |
16 #include "chromecast/browser/service/cast_service.h" | 16 #include "chromecast/browser/service/cast_service.h" |
17 #include "chromecast/browser/url_request_context_factory.h" | 17 #include "chromecast/browser/url_request_context_factory.h" |
18 #include "chromecast/browser/webui/webui_cast.h" | 18 #include "chromecast/browser/webui/webui_cast.h" |
19 #include "chromecast/common/chromecast_config.h" | 19 #include "chromecast/common/chromecast_config.h" |
20 #include "chromecast/net/network_change_notifier_cast.h" | 20 #include "chromecast/net/network_change_notifier_cast.h" |
21 #include "chromecast/net/network_change_notifier_factory_cast.h" | 21 #include "chromecast/net/network_change_notifier_factory_cast.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/common/content_switches.h" | 23 #include "content/public/common/content_switches.h" |
24 #include "media/base/media_switches.h" | 24 #include "media/base/media_switches.h" |
25 #include "ui/ozone/public/ozone_switches.h" | |
gunsch
2014/10/30 22:25:02
kIgnoreGpuBlacklist is in content_switches, which
GusFernandez
2014/10/30 22:59:54
Done.
| |
25 | 26 |
26 #if defined(OS_ANDROID) | 27 #if defined(OS_ANDROID) |
27 #include "chromecast/crash/android/crash_handler.h" | 28 #include "chromecast/crash/android/crash_handler.h" |
28 #include "components/crash/browser/crash_dump_manager_android.h" | 29 #include "components/crash/browser/crash_dump_manager_android.h" |
29 #include "net/android/network_change_notifier_factory_android.h" | 30 #include "net/android/network_change_notifier_factory_android.h" |
30 #endif // defined(OS_ANDROID) | 31 #endif // defined(OS_ANDROID) |
31 | 32 |
32 namespace chromecast { | 33 namespace chromecast { |
33 namespace shell { | 34 namespace shell { |
34 | 35 |
35 namespace { | 36 namespace { |
36 | 37 |
37 struct DefaultCommandLineSwitch { | 38 struct DefaultCommandLineSwitch { |
38 const char* const switch_name; | 39 const char* const switch_name; |
39 const char* const switch_value; | 40 const char* const switch_value; |
40 }; | 41 }; |
41 | 42 |
42 DefaultCommandLineSwitch g_default_switches[] = { | 43 DefaultCommandLineSwitch g_default_switches[] = { |
43 #if defined(OS_ANDROID) | 44 #if defined(OS_ANDROID) |
44 { switches::kMediaDrmEnableNonCompositing, ""}, | 45 { switches::kMediaDrmEnableNonCompositing, ""}, |
45 { switches::kEnableOverlayFullscreenVideo, ""}, | 46 { switches::kEnableOverlayFullscreenVideo, ""}, |
46 { switches::kDisableInfobarForProtectedMediaIdentifier, ""}, | 47 { switches::kDisableInfobarForProtectedMediaIdentifier, ""}, |
47 { switches::kDisableGestureRequirementForMediaPlayback, ""}, | 48 { switches::kDisableGestureRequirementForMediaPlayback, ""}, |
48 { switches::kForceUseOverlayEmbeddedVideo, ""}, | 49 { switches::kForceUseOverlayEmbeddedVideo, ""}, |
49 #endif | 50 #endif |
50 { switches::kDisableApplicationCache, "" }, | 51 { switches::kDisableApplicationCache, "" }, |
51 { switches::kDisablePlugins, "" }, | 52 { switches::kDisablePlugins, "" }, |
52 // Always enable HTMLMediaElement logs. | 53 // Always enable HTMLMediaElement logs. |
53 { switches::kBlinkPlatformLogChannels, "Media"}, | 54 { switches::kBlinkPlatformLogChannels, "Media"}, |
55 #if defined(OS_LINUX) && defined(ARCH_CPU_X86_FAMILY) | |
56 { switches::kIgnoreGpuBlacklist, ""}, | |
57 #endif | |
54 { NULL, NULL }, // Termination | 58 { NULL, NULL }, // Termination |
55 }; | 59 }; |
56 | 60 |
57 void AddDefaultCommandLineSwitches(CommandLine* command_line) { | 61 void AddDefaultCommandLineSwitches(CommandLine* command_line) { |
58 int i = 0; | 62 int i = 0; |
59 while (g_default_switches[i].switch_name != NULL) { | 63 while (g_default_switches[i].switch_name != NULL) { |
60 command_line->AppendSwitchASCII( | 64 command_line->AppendSwitchASCII( |
61 std::string(g_default_switches[i].switch_name), | 65 std::string(g_default_switches[i].switch_name), |
62 std::string(g_default_switches[i].switch_value)); | 66 std::string(g_default_switches[i].switch_value)); |
63 ++i; | 67 ++i; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 return true; | 157 return true; |
154 } | 158 } |
155 | 159 |
156 void CastBrowserMainParts::PostMainMessageLoopRun() { | 160 void CastBrowserMainParts::PostMainMessageLoopRun() { |
157 cast_browser_process_->cast_service()->Stop(); | 161 cast_browser_process_->cast_service()->Stop(); |
158 cast_browser_process_.reset(); | 162 cast_browser_process_.reset(); |
159 } | 163 } |
160 | 164 |
161 } // namespace shell | 165 } // namespace shell |
162 } // namespace chromecast | 166 } // namespace chromecast |
OLD | NEW |