OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "app/win/scoped_com_initializer.h" | 7 #include "app/win/scoped_com_initializer.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #endif | 64 #endif |
65 | 65 |
66 // We can not tolerate early returns from this code, because the | 66 // We can not tolerate early returns from this code, because the |
67 // detection of early return of a child process is implemented using | 67 // detection of early return of a child process is implemented using |
68 // an IPC channel error. If the IPC channel is not fully set up | 68 // an IPC channel error. If the IPC channel is not fully set up |
69 // between the browser and GPU process, and the GPU process crashes | 69 // between the browser and GPU process, and the GPU process crashes |
70 // or exits early, the browser process will never detect it. For | 70 // or exits early, the browser process will never detect it. For |
71 // this reason we defer all work related to the GPU until receiving | 71 // this reason we defer all work related to the GPU until receiving |
72 // the GpuMsg_Initialize message from the browser. | 72 // the GpuMsg_Initialize message from the browser. |
73 GpuProcess gpu_process; | 73 GpuProcess gpu_process; |
74 GpuThread* gpu_thread = new GpuThread(command_line); | 74 GpuThread* gpu_thread = new GpuThread; |
75 gpu_thread->Init(start_time); | 75 gpu_thread->Init(start_time); |
76 gpu_process.set_main_thread(gpu_thread); | 76 gpu_process.set_main_thread(gpu_thread); |
77 | 77 |
78 main_message_loop.Run(); | 78 main_message_loop.Run(); |
79 | 79 |
80 gpu_thread->StopWatchdog(); | 80 gpu_thread->StopWatchdog(); |
81 | 81 |
82 return 0; | 82 return 0; |
83 } | 83 } |
OLD | NEW |