| 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 "cc/base/switches.h" |
| 10 #include "chromecast/base/metrics/cast_metrics_helper.h" | 11 #include "chromecast/base/metrics/cast_metrics_helper.h" |
| 11 #include "chromecast/browser/cast_browser_context.h" | 12 #include "chromecast/browser/cast_browser_context.h" |
| 12 #include "chromecast/browser/cast_browser_process.h" | 13 #include "chromecast/browser/cast_browser_process.h" |
| 13 #include "chromecast/browser/devtools/remote_debugging_server.h" | 14 #include "chromecast/browser/devtools/remote_debugging_server.h" |
| 14 #include "chromecast/browser/metrics/cast_metrics_prefs.h" | 15 #include "chromecast/browser/metrics/cast_metrics_prefs.h" |
| 15 #include "chromecast/browser/metrics/cast_metrics_service_client.h" | 16 #include "chromecast/browser/metrics/cast_metrics_service_client.h" |
| 16 #include "chromecast/browser/service/cast_service.h" | 17 #include "chromecast/browser/service/cast_service.h" |
| 17 #include "chromecast/browser/url_request_context_factory.h" | 18 #include "chromecast/browser/url_request_context_factory.h" |
| 18 #include "chromecast/browser/webui/webui_cast.h" | 19 #include "chromecast/browser/webui/webui_cast.h" |
| 19 #include "chromecast/common/chromecast_config.h" | 20 #include "chromecast/common/chromecast_config.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 49 { switches::kForceUseOverlayEmbeddedVideo, ""}, | 50 { switches::kForceUseOverlayEmbeddedVideo, ""}, |
| 50 #endif | 51 #endif |
| 51 { switches::kDisableApplicationCache, "" }, | 52 { switches::kDisableApplicationCache, "" }, |
| 52 { switches::kDisablePlugins, "" }, | 53 { switches::kDisablePlugins, "" }, |
| 53 // Always enable HTMLMediaElement logs. | 54 // Always enable HTMLMediaElement logs. |
| 54 { switches::kBlinkPlatformLogChannels, "Media"}, | 55 { switches::kBlinkPlatformLogChannels, "Media"}, |
| 55 #if defined(OS_LINUX) && defined(ARCH_CPU_X86_FAMILY) | 56 #if defined(OS_LINUX) && defined(ARCH_CPU_X86_FAMILY) |
| 56 // This is needed for now to enable the egltest Ozone platform to work with | 57 // This is needed for now to enable the egltest Ozone platform to work with |
| 57 // current Linux/NVidia OpenGL drivers. | 58 // current Linux/NVidia OpenGL drivers. |
| 58 { switches::kIgnoreGpuBlacklist, ""}, | 59 { switches::kIgnoreGpuBlacklist, ""}, |
| 60 // TODO(gusfernandez): This is needed to fix a bug with |
| 61 // glPostSubBufferCHROMIUM (crbug.com/429200) |
| 62 { cc::switches::kUIDisablePartialSwap, ""}, |
| 59 #endif | 63 #endif |
| 60 { NULL, NULL }, // Termination | 64 { NULL, NULL }, // Termination |
| 61 }; | 65 }; |
| 62 | 66 |
| 63 void AddDefaultCommandLineSwitches(CommandLine* command_line) { | 67 void AddDefaultCommandLineSwitches(CommandLine* command_line) { |
| 64 int i = 0; | 68 int i = 0; |
| 65 while (g_default_switches[i].switch_name != NULL) { | 69 while (g_default_switches[i].switch_name != NULL) { |
| 66 command_line->AppendSwitchASCII( | 70 command_line->AppendSwitchASCII( |
| 67 std::string(g_default_switches[i].switch_name), | 71 std::string(g_default_switches[i].switch_name), |
| 68 std::string(g_default_switches[i].switch_value)); | 72 std::string(g_default_switches[i].switch_value)); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 return true; | 167 return true; |
| 164 } | 168 } |
| 165 | 169 |
| 166 void CastBrowserMainParts::PostMainMessageLoopRun() { | 170 void CastBrowserMainParts::PostMainMessageLoopRun() { |
| 167 cast_browser_process_->cast_service()->Stop(); | 171 cast_browser_process_->cast_service()->Stop(); |
| 168 cast_browser_process_.reset(); | 172 cast_browser_process_.reset(); |
| 169 } | 173 } |
| 170 | 174 |
| 171 } // namespace shell | 175 } // namespace shell |
| 172 } // namespace chromecast | 176 } // namespace chromecast |
| OLD | NEW |