OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 dead_on_arrival, | 287 dead_on_arrival, |
288 gpu_info, | 288 gpu_info, |
289 deferred_messages.Get()); | 289 deferred_messages.Get()); |
290 while (!deferred_messages.Get().empty()) | 290 while (!deferred_messages.Get().empty()) |
291 deferred_messages.Get().pop(); | 291 deferred_messages.Get().pop(); |
292 | 292 |
293 child_thread->Init(start_time); | 293 child_thread->Init(start_time); |
294 | 294 |
295 gpu_process.set_main_thread(child_thread); | 295 gpu_process.set_main_thread(child_thread); |
296 | 296 |
| 297 if (watchdog_thread) |
| 298 watchdog_thread->AddPowerObserver(); |
| 299 |
297 { | 300 { |
298 TRACE_EVENT0("gpu", "Run Message Loop"); | 301 TRACE_EVENT0("gpu", "Run Message Loop"); |
299 main_message_loop.Run(); | 302 main_message_loop.Run(); |
300 } | 303 } |
301 | 304 |
302 child_thread->StopWatchdog(); | 305 child_thread->StopWatchdog(); |
303 | 306 |
304 return 0; | 307 return 0; |
305 } | 308 } |
306 | 309 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 return true; | 430 return true; |
428 } | 431 } |
429 | 432 |
430 return false; | 433 return false; |
431 } | 434 } |
432 #endif // defined(OS_WIN) | 435 #endif // defined(OS_WIN) |
433 | 436 |
434 } // namespace. | 437 } // namespace. |
435 | 438 |
436 } // namespace content | 439 } // namespace content |
OLD | NEW |