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

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

Issue 16328003: Move a bunch of child-only code from content/common to content/child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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
OLDNEW
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
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
16 #include "base/threading/platform_thread.h" 16 #include "base/threading/platform_thread.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "content/common/debug_util.h"
18 #include "content/common/gpu/gpu_config.h" 19 #include "content/common/gpu/gpu_config.h"
19 #include "content/common/sandbox_linux.h" 20 #include "content/common/sandbox_linux.h"
20 #include "content/gpu/gpu_child_thread.h" 21 #include "content/gpu/gpu_child_thread.h"
21 #include "content/gpu/gpu_process.h" 22 #include "content/gpu/gpu_process.h"
22 #include "content/gpu/gpu_watchdog_thread.h" 23 #include "content/gpu/gpu_watchdog_thread.h"
23 #include "content/public/common/content_client.h" 24 #include "content/public/common/content_client.h"
24 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
25 #include "content/public/common/main_function_params.h" 26 #include "content/public/common/main_function_params.h"
26 #include "crypto/hmac.h" 27 #include "crypto/hmac.h"
27 #include "gpu/config/gpu_info_collector.h" 28 #include "gpu/config/gpu_info_collector.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 63 }
63 64
64 // Main function for starting the Gpu process. 65 // Main function for starting the Gpu process.
65 int GpuMain(const MainFunctionParams& parameters) { 66 int GpuMain(const MainFunctionParams& parameters) {
66 TRACE_EVENT0("gpu", "GpuMain"); 67 TRACE_EVENT0("gpu", "GpuMain");
67 68
68 base::Time start_time = base::Time::Now(); 69 base::Time start_time = base::Time::Now();
69 70
70 const CommandLine& command_line = parameters.command_line; 71 const CommandLine& command_line = parameters.command_line;
71 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { 72 if (command_line.HasSwitch(switches::kGpuStartupDialog)) {
72 ChildProcess::WaitForDebugger("Gpu"); 73 WaitForDebugger("Gpu");
73 } 74 }
74 75
75 if (!command_line.HasSwitch(switches::kSingleProcess)) { 76 if (!command_line.HasSwitch(switches::kSingleProcess)) {
76 #if defined(OS_WIN) 77 #if defined(OS_WIN)
77 // Prevent Windows from displaying a modal dialog on failures like not being 78 // Prevent Windows from displaying a modal dialog on failures like not being
78 // able to load a DLL. 79 // able to load a DLL.
79 SetErrorMode( 80 SetErrorMode(
80 SEM_FAILCRITICALERRORS | 81 SEM_FAILCRITICALERRORS |
81 SEM_NOGPFAULTERRORBOX | 82 SEM_NOGPFAULTERRORBOX |
82 SEM_NOOPENFILEERRORBOX); 83 SEM_NOOPENFILEERRORBOX);
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 return true; 388 return true;
388 } 389 }
389 390
390 return false; 391 return false;
391 } 392 }
392 #endif // defined(OS_WIN) 393 #endif // defined(OS_WIN)
393 394
394 } // namespace. 395 } // namespace.
395 396
396 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698