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

Side by Side Diff: content/renderer/renderer_main.cc

Issue 10560022: Browser Plugin: New Implementation (Browser Side) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Address some of creis@'s comments. Handing off to Istiaque as I head for vacation. Created 8 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
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/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/hi_res_timer_manager.h" 9 #include "base/hi_res_timer_manager.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/metrics/field_trial.h" 12 #include "base/metrics/field_trial.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
15 #include "base/metrics/stats_counters.h" 15 #include "base/metrics/stats_counters.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/process_util.h" 17 #include "base/process_util.h"
18 #include "base/string_util.h" 18 #include "base/string_util.h"
19 #include "base/system_monitor/system_monitor.h" 19 #include "base/system_monitor/system_monitor.h"
20 #include "base/threading/platform_thread.h" 20 #include "base/threading/platform_thread.h"
21 #include "base/time.h" 21 #include "base/time.h"
22 #include "content/common/pepper_plugin_registry.h" 22 #include "content/common/pepper_plugin_registry.h"
23 #include "content/public/common/content_switches.h" 23 #include "content/public/common/content_switches.h"
24 #include "content/public/common/main_function_params.h" 24 #include "content/public/common/main_function_params.h"
25 #include "content/public/renderer/content_renderer_client.h" 25 #include "content/public/renderer/content_renderer_client.h"
26 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h"
26 #include "content/renderer/render_process_impl.h" 27 #include "content/renderer/render_process_impl.h"
27 #include "content/renderer/render_thread_impl.h" 28 #include "content/renderer/render_thread_impl.h"
28 #include "content/renderer/renderer_main_platform_delegate.h" 29 #include "content/renderer/renderer_main_platform_delegate.h"
29 #include "ui/base/ui_base_switches.h" 30 #include "ui/base/ui_base_switches.h"
30 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" 31 #include "webkit/plugins/ppapi/ppapi_interface_factory.h"
31 32
32 #if defined(OS_MACOSX) 33 #if defined(OS_MACOSX)
33 #include <Carbon/Carbon.h> 34 #include <Carbon/Carbon.h>
34 #include <signal.h> 35 #include <signal.h>
35 #include <unistd.h> 36 #include <unistd.h>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 bool run_loop = true; 207 bool run_loop = true;
207 if (!no_sandbox) { 208 if (!no_sandbox) {
208 run_loop = platform.EnableSandbox(); 209 run_loop = platform.EnableSandbox();
209 } else { 210 } else {
210 LOG(ERROR) << "Running without renderer sandbox"; 211 LOG(ERROR) << "Running without renderer sandbox";
211 } 212 }
212 #if defined(OS_POSIX) && !defined(OS_MACOSX) 213 #if defined(OS_POSIX) && !defined(OS_MACOSX)
213 RenderProcessImpl render_process; 214 RenderProcessImpl render_process;
214 new RenderThreadImpl(); 215 new RenderThreadImpl();
215 #endif 216 #endif
217 new content::BrowserPluginManagerImpl();
216 218
217 platform.RunSandboxTests(); 219 platform.RunSandboxTests();
218 220
219 startup_timer.Stop(); // End of Startup Time Measurement. 221 startup_timer.Stop(); // End of Startup Time Measurement.
220 222
221 if (run_loop) { 223 if (run_loop) {
222 #if defined(OS_MACOSX) 224 #if defined(OS_MACOSX)
223 if (pool) 225 if (pool)
224 pool->Recycle(); 226 pool->Recycle();
225 #endif 227 #endif
226 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); 228 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0);
227 MessageLoop::current()->Run(); 229 MessageLoop::current()->Run();
228 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); 230 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
229 } 231 }
230 } 232 }
231 platform.PlatformUninitialize(); 233 platform.PlatformUninitialize();
232 TRACE_EVENT_END_ETW("RendererMain", 0, ""); 234 TRACE_EVENT_END_ETW("RendererMain", 0, "");
233 return 0; 235 return 0;
234 } 236 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698