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/shell/browser/cast_browser_main_parts.h" | 5 #include "chromecast/shell/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/common/chromecast_config.h" | 10 #include "chromecast/common/chromecast_config.h" |
11 #include "chromecast/metrics/cast_metrics_service_client.h" | 11 #include "chromecast/metrics/cast_metrics_service_client.h" |
12 #include "chromecast/net/network_change_notifier_cast.h" | 12 #include "chromecast/net/network_change_notifier_cast.h" |
13 #include "chromecast/net/network_change_notifier_factory_cast.h" | 13 #include "chromecast/net/network_change_notifier_factory_cast.h" |
14 #include "chromecast/service/cast_service.h" | 14 #include "chromecast/service/cast_service.h" |
15 #include "chromecast/shell/browser/cast_browser_context.h" | 15 #include "chromecast/shell/browser/cast_browser_context.h" |
16 #include "chromecast/shell/browser/cast_browser_process.h" | 16 #include "chromecast/shell/browser/cast_browser_process.h" |
17 #include "chromecast/shell/browser/devtools/remote_debugging_server.h" | 17 #include "chromecast/shell/browser/devtools/remote_debugging_server.h" |
18 #include "chromecast/shell/browser/url_request_context_factory.h" | 18 #include "chromecast/shell/browser/url_request_context_factory.h" |
19 #include "chromecast/shell/browser/webui/webui_cast.h" | 19 #include "chromecast/shell/browser/webui/webui_cast.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
22 #include "media/base/media_switches.h" | |
22 | 23 |
23 #if defined(OS_ANDROID) | 24 #if defined(OS_ANDROID) |
24 #include "net/android/network_change_notifier_factory_android.h" | 25 #include "net/android/network_change_notifier_factory_android.h" |
25 #endif // defined(OS_ANDROID) | 26 #endif // defined(OS_ANDROID) |
26 | 27 |
27 namespace chromecast { | 28 namespace chromecast { |
28 namespace shell { | 29 namespace shell { |
29 | 30 |
30 namespace { | 31 namespace { |
31 | 32 |
32 struct DefaultCommandLineSwitch { | 33 struct DefaultCommandLineSwitch { |
33 const char* const switch_name; | 34 const char* const switch_name; |
34 const char* const switch_value; | 35 const char* const switch_value; |
35 }; | 36 }; |
36 | 37 |
37 DefaultCommandLineSwitch g_default_switches[] = { | 38 DefaultCommandLineSwitch g_default_switches[] = { |
39 #if defined(OS_ANDROID) | |
40 { switches::kMediaDrmEnableNonCompositing, ""}, | |
xhwang
2014/09/26 21:49:37
IIRIC, with this, we'll always use the full screen
gunsch
2014/09/26 22:03:17
We also build our Cast ATV build with VIDEO_HOLE.
| |
41 { switches::kEnableOverlayFullscreenVideo, ""}, | |
42 { switches::kDisableInfobarForProtectedMediaIdentifier, ""}, | |
xhwang
2014/09/26 21:49:37
The info bar is required for privacy reasons. Did
gunsch
2014/09/26 22:03:17
Thanks for checking. Answer is yes (and double-che
| |
43 { switches::kDisableGestureRequirementForMediaPlayback, ""}, | |
44 #endif | |
38 { switches::kDisableApplicationCache, "" }, | 45 { switches::kDisableApplicationCache, "" }, |
39 { switches::kDisablePlugins, "" }, | 46 { switches::kDisablePlugins, "" }, |
40 { NULL, NULL }, // Termination | 47 { NULL, NULL }, // Termination |
41 }; | 48 }; |
42 | 49 |
43 void AddDefaultCommandLineSwitches(CommandLine* command_line) { | 50 void AddDefaultCommandLineSwitches(CommandLine* command_line) { |
44 int i = 0; | 51 int i = 0; |
45 while (g_default_switches[i].switch_name != NULL) { | 52 while (g_default_switches[i].switch_name != NULL) { |
46 command_line->AppendSwitchASCII( | 53 command_line->AppendSwitchASCII( |
47 std::string(g_default_switches[i].switch_name), | 54 std::string(g_default_switches[i].switch_name), |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 return true; | 124 return true; |
118 } | 125 } |
119 | 126 |
120 void CastBrowserMainParts::PostMainMessageLoopRun() { | 127 void CastBrowserMainParts::PostMainMessageLoopRun() { |
121 cast_browser_process_->cast_service()->Stop(); | 128 cast_browser_process_->cast_service()->Stop(); |
122 cast_browser_process_.reset(); | 129 cast_browser_process_.reset(); |
123 } | 130 } |
124 | 131 |
125 } // namespace shell | 132 } // namespace shell |
126 } // namespace chromecast | 133 } // namespace chromecast |
OLD | NEW |