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

Side by Side Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | « content/ppapi_plugin/ppapi_broker_main.cc ('k') | content/ppapi_plugin/ppapi_thread.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) 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"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // http://crbug.com/155671 72 // http://crbug.com/155671
73 // 73 //
74 // ICU can accept "en-US" or "en_US", but POSIX wants "en_US". 74 // ICU can accept "en-US" or "en_US", but POSIX wants "en_US".
75 std::replace(locale.begin(), locale.end(), '-', '_'); 75 std::replace(locale.begin(), locale.end(), '-', '_');
76 locale.append(".UTF-8"); 76 locale.append(".UTF-8");
77 setlocale(LC_ALL, locale.c_str()); 77 setlocale(LC_ALL, locale.c_str());
78 setenv("LANG", locale.c_str(), 0); 78 setenv("LANG", locale.c_str(), 0);
79 #endif 79 #endif
80 } 80 }
81 81
82 MessageLoop main_message_loop; 82 base::MessageLoop main_message_loop;
83 base::PlatformThread::SetName("CrPPAPIMain"); 83 base::PlatformThread::SetName("CrPPAPIMain");
84 84
85 #if defined(OS_LINUX) && defined(USE_NSS) 85 #if defined(OS_LINUX) && defined(USE_NSS)
86 // Some out-of-process PPAPI plugins use NSS. 86 // Some out-of-process PPAPI plugins use NSS.
87 // NSS must be initialized before enabling the sandbox below. 87 // NSS must be initialized before enabling the sandbox below.
88 crypto::InitNSSSafely(); 88 crypto::InitNSSSafely();
89 #endif 89 #endif
90 90
91 // Allow the embedder to perform any necessary per-process initialization 91 // Allow the embedder to perform any necessary per-process initialization
92 // before the sandbox is initialized. 92 // before the sandbox is initialized.
93 if (GetContentClient()->plugin()) 93 if (GetContentClient()->plugin())
94 GetContentClient()->plugin()->PreSandboxInitialization(); 94 GetContentClient()->plugin()->PreSandboxInitialization();
95 95
96 #if defined(OS_LINUX) 96 #if defined(OS_LINUX)
97 LinuxSandbox::InitializeSandbox(); 97 LinuxSandbox::InitializeSandbox();
98 #endif 98 #endif
99 99
100 ChildProcess ppapi_process; 100 ChildProcess ppapi_process;
101 ppapi_process.set_main_thread( 101 ppapi_process.set_main_thread(
102 new PpapiThread(parameters.command_line, false)); // Not a broker. 102 new PpapiThread(parameters.command_line, false)); // Not a broker.
103 103
104 main_message_loop.Run(); 104 main_message_loop.Run();
105 return 0; 105 return 0;
106 } 106 }
107 107
108 } // namespace content 108 } // namespace content
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_broker_main.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698