Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: content/gpu/gpu_main.cc

Issue 7529003: Make base::MessageLoops have names at construction time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make message loop name optional. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/service/service_main.cc ('k') | content/plugin/plugin_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <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
11 #include "base/environment.h" 11 #include "base/environment.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/stringprintf.h" 13 #include "base/stringprintf.h"
14 #include "base/threading/platform_thread.h"
15 #include "base/win/scoped_com_initializer.h" 14 #include "base/win/scoped_com_initializer.h"
16 #include "build/build_config.h" 15 #include "build/build_config.h"
17 #include "content/common/content_switches.h" 16 #include "content/common/content_switches.h"
18 #include "content/common/gpu/gpu_config.h" 17 #include "content/common/gpu/gpu_config.h"
19 #include "content/common/main_function_params.h" 18 #include "content/common/main_function_params.h"
20 #include "content/gpu/gpu_child_thread.h" 19 #include "content/gpu/gpu_child_thread.h"
21 #include "content/gpu/gpu_process.h" 20 #include "content/gpu/gpu_process.h"
22 #include "ui/gfx/gl/gl_surface.h" 21 #include "ui/gfx/gl/gl_surface.h"
23 22
24 #if defined(OS_MACOSX) 23 #if defined(OS_MACOSX)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // is sandboxed and we must call LowerToken() before rendering untrusted 65 // is sandboxed and we must call LowerToken() before rendering untrusted
67 // content. 66 // content.
68 if (target_services) 67 if (target_services)
69 target_services->LowerToken(); 68 target_services->LowerToken();
70 #endif 69 #endif
71 70
72 #if defined(OS_MACOSX) 71 #if defined(OS_MACOSX)
73 chrome_application_mac::RegisterCrApp(); 72 chrome_application_mac::RegisterCrApp();
74 #endif 73 #endif
75 74
76 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 75 MessageLoop main_message_loop("CrGpuMain", MessageLoop::TYPE_UI);
77 base::PlatformThread::SetName("CrGpuMain");
78 76
79 if (!command_line.HasSwitch(switches::kSingleProcess)) { 77 if (!command_line.HasSwitch(switches::kSingleProcess)) {
80 #if defined(OS_WIN) 78 #if defined(OS_WIN)
81 // Prevent Windows from displaying a modal dialog on failures like not being 79 // Prevent Windows from displaying a modal dialog on failures like not being
82 // able to load a DLL. 80 // able to load a DLL.
83 SetErrorMode( 81 SetErrorMode(
84 SEM_FAILCRITICALERRORS | 82 SEM_FAILCRITICALERRORS |
85 SEM_NOGPFAULTERRORBOX | 83 SEM_NOGPFAULTERRORBOX |
86 SEM_NOOPENFILEERRORBOX); 84 SEM_NOOPENFILEERRORBOX);
87 #elif defined(USE_X11) 85 #elif defined(USE_X11)
(...skipping 10 matching lines...) Expand all
98 child_thread->Init(start_time); 96 child_thread->Init(start_time);
99 97
100 gpu_process.set_main_thread(child_thread); 98 gpu_process.set_main_thread(child_thread);
101 99
102 main_message_loop.Run(); 100 main_message_loop.Run();
103 101
104 child_thread->StopWatchdog(); 102 child_thread->StopWatchdog();
105 103
106 return 0; 104 return 0;
107 } 105 }
OLDNEW
« no previous file with comments | « chrome/service/service_main.cc ('k') | content/plugin/plugin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698