| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <iostream> | 5 #include <iostream> |
| 6 #include <signal.h> | 6 #include <signal.h> |
| 7 #include <X11/keysym.h> | 7 #include <X11/keysym.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 CommandLine::ForCurrentProcess()->GetSwitchValueASCII("file"); | 214 CommandLine::ForCurrentProcess()->GetSwitchValueASCII("file"); |
| 215 bool enable_audio = CommandLine::ForCurrentProcess()->HasSwitch("audio"); | 215 bool enable_audio = CommandLine::ForCurrentProcess()->HasSwitch("audio"); |
| 216 bool use_gl = CommandLine::ForCurrentProcess()->HasSwitch("use-gl"); | 216 bool use_gl = CommandLine::ForCurrentProcess()->HasSwitch("use-gl"); |
| 217 bool audio_only = false; | 217 bool audio_only = false; |
| 218 | 218 |
| 219 logging::InitLogging( | 219 logging::InitLogging( |
| 220 NULL, | 220 NULL, |
| 221 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 221 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, |
| 222 logging::LOCK_LOG_FILE, // Ignored. | 222 logging::LOCK_LOG_FILE, // Ignored. |
| 223 logging::DELETE_OLD_LOG_FILE, // Ignored. | 223 logging::DELETE_OLD_LOG_FILE, // Ignored. |
| 224 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | 224 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS, |
| 225 logging::DISABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
| 225 | 226 |
| 226 // Install the signal handler. | 227 // Install the signal handler. |
| 227 signal(SIGTERM, &TerminateHandler); | 228 signal(SIGTERM, &TerminateHandler); |
| 228 signal(SIGINT, &TerminateHandler); | 229 signal(SIGINT, &TerminateHandler); |
| 229 | 230 |
| 230 // Initialize X11. | 231 // Initialize X11. |
| 231 if (!InitX11()) | 232 if (!InitX11()) |
| 232 return 1; | 233 return 1; |
| 233 | 234 |
| 234 // Initialize the pipeline thread and the pipeline. | 235 // Initialize the pipeline thread and the pipeline. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 257 } | 258 } |
| 258 | 259 |
| 259 // Cleanup tasks. | 260 // Cleanup tasks. |
| 260 message_loop_factory.reset(); | 261 message_loop_factory.reset(); |
| 261 | 262 |
| 262 thread->Stop(); | 263 thread->Stop(); |
| 263 XDestroyWindow(g_display, g_window); | 264 XDestroyWindow(g_display, g_window); |
| 264 XCloseDisplay(g_display); | 265 XCloseDisplay(g_display); |
| 265 return 0; | 266 return 0; |
| 266 } | 267 } |
| OLD | NEW |