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

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

Issue 8387039: Move content_restriction.h and main_function_params.h to content/public/common, and put them in t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/debug/trace_event.h" 6 #include "base/debug/trace_event.h"
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/metrics/stats_counters.h" 12 #include "base/metrics/stats_counters.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/process_util.h" 14 #include "base/process_util.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "base/system_monitor/system_monitor.h" 16 #include "base/system_monitor/system_monitor.h"
17 #include "base/threading/platform_thread.h" 17 #include "base/threading/platform_thread.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "content/common/content_counters.h" 19 #include "content/common/content_counters.h"
20 #include "content/common/main_function_params.h"
21 #include "content/common/hi_res_timer_manager.h" 20 #include "content/common/hi_res_timer_manager.h"
22 #include "content/common/pepper_plugin_registry.h" 21 #include "content/common/pepper_plugin_registry.h"
23 #include "content/public/common/content_switches.h" 22 #include "content/public/common/content_switches.h"
23 #include "content/public/common/main_function_params.h"
24 #include "content/renderer/render_process_impl.h" 24 #include "content/renderer/render_process_impl.h"
25 #include "content/renderer/render_thread_impl.h" 25 #include "content/renderer/render_thread_impl.h"
26 #include "content/renderer/renderer_main_platform_delegate.h" 26 #include "content/renderer/renderer_main_platform_delegate.h"
27 #include "ui/base/ui_base_switches.h" 27 #include "ui/base/ui_base_switches.h"
28 28
29 #if defined(OS_MACOSX) 29 #if defined(OS_MACOSX)
30 #include <Carbon/Carbon.h> 30 #include <Carbon/Carbon.h>
31 #include <signal.h> 31 #include <signal.h>
32 #include <unistd.h> 32 #include <unistd.h>
33 33
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 process_times_->AddTime(base::TimeTicks::Now() - begin_process_message_); 114 process_times_->AddTime(base::TimeTicks::Now() - begin_process_message_);
115 } 115 }
116 116
117 private: 117 private:
118 base::TimeTicks begin_process_message_; 118 base::TimeTicks begin_process_message_;
119 base::Histogram* const process_times_; 119 base::Histogram* const process_times_;
120 DISALLOW_COPY_AND_ASSIGN(RendererMessageLoopObserver); 120 DISALLOW_COPY_AND_ASSIGN(RendererMessageLoopObserver);
121 }; 121 };
122 122
123 // mainline routine for running as the Renderer process 123 // mainline routine for running as the Renderer process
124 int RendererMain(const MainFunctionParams& parameters) { 124 int RendererMain(const content::MainFunctionParams& parameters) {
125 TRACE_EVENT_BEGIN_ETW("RendererMain", 0, ""); 125 TRACE_EVENT_BEGIN_ETW("RendererMain", 0, "");
126 126
127 const CommandLine& parsed_command_line = parameters.command_line; 127 const CommandLine& parsed_command_line = parameters.command_line;
128 128
129 #if defined(OS_MACOSX) 129 #if defined(OS_MACOSX)
130 base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool; 130 base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool;
131 InstallFrameworkHacks(); 131 InstallFrameworkHacks();
132 #endif // OS_MACOSX 132 #endif // OS_MACOSX
133 133
134 #if defined(OS_CHROMEOS) 134 #if defined(OS_CHROMEOS)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 #endif 228 #endif
229 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); 229 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0);
230 MessageLoop::current()->Run(); 230 MessageLoop::current()->Run();
231 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); 231 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
232 } 232 }
233 } 233 }
234 platform.PlatformUninitialize(); 234 platform.PlatformUninitialize();
235 TRACE_EVENT_END_ETW("RendererMain", 0, ""); 235 TRACE_EVENT_END_ETW("RendererMain", 0, "");
236 return 0; 236 return 0;
237 } 237 }
OLDNEW
« no previous file with comments | « content/public/common/main_function_params.h ('k') | content/renderer/renderer_main_platform_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698