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

Side by Side Diff: content/ppapi_plugin/ppapi_plugin_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: deps for single process 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/debug/debugger.h" 6 #include "base/debug/debugger.h"
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "content/common/child_process.h" 11 #include "content/child/child_process.h"
12 #include "content/common/debug_util.h"
12 #include "content/common/sandbox_linux.h" 13 #include "content/common/sandbox_linux.h"
13 #include "content/ppapi_plugin/ppapi_thread.h" 14 #include "content/ppapi_plugin/ppapi_thread.h"
14 #include "content/public/common/content_client.h" 15 #include "content/public/common/content_client.h"
15 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
16 #include "content/public/common/main_function_params.h" 17 #include "content/public/common/main_function_params.h"
17 #include "content/public/plugin/content_plugin_client.h" 18 #include "content/public/plugin/content_plugin_client.h"
18 #include "crypto/nss_util.h" 19 #include "crypto/nss_util.h"
19 #include "ppapi/proxy/proxy_module.h" 20 #include "ppapi/proxy/proxy_module.h"
20 #include "ui/base/ui_base_switches.h" 21 #include "ui/base/ui_base_switches.h"
21 22
(...skipping 25 matching lines...) Expand all
47 g_target_services = parameters.sandbox_info->target_services; 48 g_target_services = parameters.sandbox_info->target_services;
48 #endif 49 #endif
49 50
50 // If |g_target_services| is not null this process is sandboxed. One side 51 // If |g_target_services| is not null this process is sandboxed. One side
51 // effect is that we can't pop dialogs like ChildProcess::WaitForDebugger() 52 // effect is that we can't pop dialogs like ChildProcess::WaitForDebugger()
52 // does. 53 // does.
53 if (command_line.HasSwitch(switches::kPpapiStartupDialog)) { 54 if (command_line.HasSwitch(switches::kPpapiStartupDialog)) {
54 if (g_target_services) 55 if (g_target_services)
55 base::debug::WaitForDebugger(2*60, false); 56 base::debug::WaitForDebugger(2*60, false);
56 else 57 else
57 ChildProcess::WaitForDebugger("Ppapi"); 58 WaitForDebugger("Ppapi");
58 } 59 }
59 60
60 // Set the default locale to be the current UI language. WebKit uses ICU's 61 // Set the default locale to be the current UI language. WebKit uses ICU's
61 // default locale for some font settings (especially switching between 62 // default locale for some font settings (especially switching between
62 // Japanese and Chinese fonts for the same characters). 63 // Japanese and Chinese fonts for the same characters).
63 if (command_line.HasSwitch(switches::kLang)) { 64 if (command_line.HasSwitch(switches::kLang)) {
64 std::string locale = command_line.GetSwitchValueASCII(switches::kLang); 65 std::string locale = command_line.GetSwitchValueASCII(switches::kLang);
65 base::i18n::SetICUDefaultLocale(locale); 66 base::i18n::SetICUDefaultLocale(locale);
66 67
67 #if defined(OS_POSIX) && !defined(OS_ANDROID) 68 #if defined(OS_POSIX) && !defined(OS_ANDROID)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 100
100 ChildProcess ppapi_process; 101 ChildProcess ppapi_process;
101 ppapi_process.set_main_thread( 102 ppapi_process.set_main_thread(
102 new PpapiThread(parameters.command_line, false)); // Not a broker. 103 new PpapiThread(parameters.command_line, false)); // Not a broker.
103 104
104 main_message_loop.Run(); 105 main_message_loop.Run();
105 return 0; 106 return 0;
106 } 107 }
107 108
108 } // namespace content 109 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698