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 <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "content/public/browser/child_process_security_policy.h" | 54 #include "content/public/browser/child_process_security_policy.h" |
55 #include "content/public/browser/gpu_data_manager.h" | 55 #include "content/public/browser/gpu_data_manager.h" |
56 #include "content/public/browser/storage_partition.h" | 56 #include "content/public/browser/storage_partition.h" |
57 #include "content/public/common/content_switches.h" | 57 #include "content/public/common/content_switches.h" |
58 #include "device/geolocation/geolocation_delegate.h" | 58 #include "device/geolocation/geolocation_delegate.h" |
59 #include "device/geolocation/geolocation_provider.h" | 59 #include "device/geolocation/geolocation_provider.h" |
60 #include "gpu/command_buffer/service/gpu_switches.h" | 60 #include "gpu/command_buffer/service/gpu_switches.h" |
61 #include "media/base/media.h" | 61 #include "media/base/media.h" |
62 #include "media/base/media_switches.h" | 62 #include "media/base/media_switches.h" |
63 #include "ui/compositor/compositor_switches.h" | 63 #include "ui/compositor/compositor_switches.h" |
64 #include "ui/native_theme/native_theme_switches.h" | |
65 | 64 |
66 #if !defined(OS_ANDROID) | 65 #if !defined(OS_ANDROID) |
67 #include <signal.h> | 66 #include <signal.h> |
68 #include <sys/prctl.h> | 67 #include <sys/prctl.h> |
69 #endif | 68 #endif |
70 #if defined(OS_LINUX) | 69 #if defined(OS_LINUX) |
71 #include <fontconfig/fontconfig.h> | 70 #include <fontconfig/fontconfig.h> |
72 #endif | 71 #endif |
73 | 72 |
74 #if defined(OS_ANDROID) | 73 #if defined(OS_ANDROID) |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 #endif | 237 #endif |
239 #endif // defined(OS_LINUX) | 238 #endif // defined(OS_LINUX) |
240 // Needed so that our call to GpuDataManager::SetGLStrings doesn't race | 239 // Needed so that our call to GpuDataManager::SetGLStrings doesn't race |
241 // against GPU process creation (which is otherwise triggered from | 240 // against GPU process creation (which is otherwise triggered from |
242 // BrowserThreadsStarted). The GPU process will be created as soon as a | 241 // BrowserThreadsStarted). The GPU process will be created as soon as a |
243 // renderer needs it, which always happens after main loop starts. | 242 // renderer needs it, which always happens after main loop starts. |
244 { switches::kDisableGpuEarlyInit, "" }, | 243 { switches::kDisableGpuEarlyInit, "" }, |
245 // Enable navigator.connection API. | 244 // Enable navigator.connection API. |
246 // TODO(derekjchow): Remove this switch when enabled by default. | 245 // TODO(derekjchow): Remove this switch when enabled by default. |
247 { switches::kEnableNetworkInformation, "" }, | 246 { switches::kEnableNetworkInformation, "" }, |
248 { switches::kHideScrollbars, "" }, | |
249 { NULL, NULL }, // Termination | 247 { NULL, NULL }, // Termination |
250 }; | 248 }; |
251 | 249 |
252 void AddDefaultCommandLineSwitches(base::CommandLine* command_line) { | 250 void AddDefaultCommandLineSwitches(base::CommandLine* command_line) { |
253 int i = 0; | 251 int i = 0; |
254 while (g_default_switches[i].switch_name != NULL) { | 252 while (g_default_switches[i].switch_name != NULL) { |
255 command_line->AppendSwitchASCII( | 253 command_line->AppendSwitchASCII( |
256 std::string(g_default_switches[i].switch_name), | 254 std::string(g_default_switches[i].switch_name), |
257 std::string(g_default_switches[i].switch_value)); | 255 std::string(g_default_switches[i].switch_value)); |
258 ++i; | 256 ++i; |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 | 537 |
540 void CastBrowserMainParts::PostDestroyThreads() { | 538 void CastBrowserMainParts::PostDestroyThreads() { |
541 #if !defined(OS_ANDROID) | 539 #if !defined(OS_ANDROID) |
542 media_resource_tracker_->FinalizeAndDestroy(); | 540 media_resource_tracker_->FinalizeAndDestroy(); |
543 media_resource_tracker_ = nullptr; | 541 media_resource_tracker_ = nullptr; |
544 #endif | 542 #endif |
545 } | 543 } |
546 | 544 |
547 } // namespace shell | 545 } // namespace shell |
548 } // namespace chromecast | 546 } // namespace chromecast |
OLD | NEW |