summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-31 20:25:18 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-31 20:25:18 +0000
commit4573fbd30d7ed70f959efb69b32ad9547465f0ce (patch)
tree958d424cf2dfa7b22aba942c8ebc383a5ba22517 /content
parent5262dc192af688c4f9301753fa7890975303b909 (diff)
downloadchromium_src-4573fbd30d7ed70f959efb69b32ad9547465f0ce.zip
chromium_src-4573fbd30d7ed70f959efb69b32ad9547465f0ce.tar.gz
chromium_src-4573fbd30d7ed70f959efb69b32ad9547465f0ce.tar.bz2
Move content_restriction.h and main_function_params.h to content/public/common, and put them in the content namespace.
BUG=98716 Review URL: http://codereview.chromium.org/8387039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/app/content_main.cc33
-rw-r--r--content/browser/browser_main.cc4
-rw-r--r--content/browser/browser_main.h6
-rw-r--r--content/browser/browser_main_loop.cc4
-rw-r--r--content/browser/browser_main_loop.h7
-rw-r--r--content/browser/mock_content_browser_client.cc2
-rw-r--r--content/browser/mock_content_browser_client.h2
-rw-r--r--content/browser/tab_contents/tab_contents.cc2
-rw-r--r--content/browser/zygote_main_linux.cc4
-rw-r--r--content/content_common.gypi4
-rw-r--r--content/gpu/gpu_main.cc4
-rw-r--r--content/plugin/plugin_main.cc4
-rw-r--r--content/ppapi_plugin/ppapi_broker_main.cc4
-rw-r--r--content/ppapi_plugin/ppapi_plugin_main.cc4
-rw-r--r--content/public/app/content_main_delegate.h8
-rw-r--r--content/public/browser/content_browser_client.h4
-rw-r--r--content/public/common/content_restriction.h (renamed from content/common/content_restriction.h)10
-rw-r--r--content/public/common/main_function_params.h (renamed from content/common/main_function_params.h)10
-rw-r--r--content/renderer/renderer_main.cc4
-rw-r--r--content/renderer/renderer_main_platform_delegate.h7
-rw-r--r--content/renderer/renderer_main_platform_delegate_linux.cc2
-rw-r--r--content/renderer/renderer_main_platform_delegate_mac.mm2
-rw-r--r--content/renderer/renderer_main_platform_delegate_win.cc2
-rw-r--r--content/shell/shell_browser_main.cc2
-rw-r--r--content/shell/shell_browser_main.h4
-rw-r--r--content/shell/shell_content_browser_client.cc2
-rw-r--r--content/shell/shell_content_browser_client.h2
-rw-r--r--content/shell/shell_main_delegate.cc2
-rw-r--r--content/shell/shell_main_delegate.h2
-rw-r--r--content/test/browser_test_base.cc6
-rw-r--r--content/test/render_view_test.cc2
-rw-r--r--content/test/render_view_test.h4
-rw-r--r--content/utility/utility_main.cc4
-rw-r--r--content/worker/worker_main.cc4
34 files changed, 88 insertions, 79 deletions
diff --git a/content/app/content_main.cc b/content/app/content_main.cc
index 3cbf07f..ace58ff 100644
--- a/content/app/content_main.cc
+++ b/content/app/content_main.cc
@@ -15,7 +15,6 @@
#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "content/browser/browser_main.h"
-#include "content/common/main_function_params.h"
#include "content/common/set_process_title.h"
#include "content/public/app/content_main_delegate.h"
#include "content/public/app/startup_helper_win.h"
@@ -23,6 +22,7 @@
#include "content/public/common/content_constants.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#include "content/public/common/sandbox_init.h"
#include "crypto/nss_util.h"
#include "ipc/ipc_switches.h"
@@ -59,15 +59,15 @@ int tc_set_new_mode(int mode);
}
#endif
-extern int GpuMain(const MainFunctionParams&);
-extern int PluginMain(const MainFunctionParams&);
-extern int PpapiPluginMain(const MainFunctionParams&);
-extern int PpapiBrokerMain(const MainFunctionParams&);
-extern int RendererMain(const MainFunctionParams&);
-extern int WorkerMain(const MainFunctionParams&);
-extern int UtilityMain(const MainFunctionParams&);
+extern int GpuMain(const content::MainFunctionParams&);
+extern int PluginMain(const content::MainFunctionParams&);
+extern int PpapiPluginMain(const content::MainFunctionParams&);
+extern int PpapiBrokerMain(const content::MainFunctionParams&);
+extern int RendererMain(const content::MainFunctionParams&);
+extern int WorkerMain(const content::MainFunctionParams&);
+extern int UtilityMain(const content::MainFunctionParams&);
#if defined(OS_POSIX) && !defined(OS_MACOSX)
-extern int ZygoteMain(const MainFunctionParams&,
+extern int ZygoteMain(const content::MainFunctionParams&,
content::ZygoteForkDelegate* forkdelegate);
#endif
@@ -176,7 +176,7 @@ void InitializeStatsTable(base::ProcessId browser_pid,
// flag. This struct is used to build a table of (flag, main function) pairs.
struct MainFunction {
const char* name;
- int (*function)(const MainFunctionParams&);
+ int (*function)(const content::MainFunctionParams&);
};
#if defined(OS_POSIX) && !defined(OS_MACOSX)
@@ -184,7 +184,7 @@ struct MainFunction {
// subprocesses that are launched via the zygote. This function
// fills in some process-launching bits around ZygoteMain().
// Returns the exit code of the subprocess.
-int RunZygote(const MainFunctionParams& main_function_params,
+int RunZygote(const content::MainFunctionParams& main_function_params,
content::ContentMainDelegate* delegate) {
static const MainFunction kMainFunctions[] = {
{ switches::kRendererProcess, RendererMain },
@@ -219,7 +219,7 @@ int RunZygote(const MainFunctionParams& main_function_params,
base::GetParentProcessId(base::GetCurrentProcId()));
InitializeStatsTable(browser_pid, command_line);
- MainFunctionParams main_params(command_line);
+ content::MainFunctionParams main_params(command_line);
// Get the new process type from the new command line.
std::string process_type =
@@ -241,9 +241,10 @@ int RunZygote(const MainFunctionParams& main_function_params,
// Run the FooMain() for a given process type.
// If |process_type| is empty, runs BrowserMain().
// Returns the exit code for this process.
-int RunNamedProcessTypeMain(const std::string& process_type,
- const MainFunctionParams& main_function_params,
- content::ContentMainDelegate* delegate) {
+int RunNamedProcessTypeMain(
+ const std::string& process_type,
+ const content::MainFunctionParams& main_function_params,
+ content::ContentMainDelegate* delegate) {
static const MainFunction kMainFunctions[] = {
{ "", BrowserMain },
{ switches::kRendererProcess, RendererMain },
@@ -435,7 +436,7 @@ int ContentMain(int argc,
SetProcessTitleFromCommandLine(argv);
#endif
- MainFunctionParams main_params(command_line);
+ content::MainFunctionParams main_params(command_line);
#if defined(OS_WIN)
main_params.sandbox_info = sandbox_info;
#elif defined(OS_MACOSX)
diff --git a/content/browser/browser_main.cc b/content/browser/browser_main.cc
index c358f49..1127117 100644
--- a/content/browser/browser_main.cc
+++ b/content/browser/browser_main.cc
@@ -11,8 +11,8 @@
#include "base/metrics/histogram.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/notification_service_impl.h"
-#include "content/common/main_function_params.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#if defined(OS_WIN)
#include "base/win/scoped_com_initializer.h"
@@ -33,7 +33,7 @@ bool ExitedMainMessageLoop() {
} // namespace content
// Main routine for running as the Browser process.
-int BrowserMain(const MainFunctionParams& parameters) {
+int BrowserMain(const content::MainFunctionParams& parameters) {
TRACE_EVENT_BEGIN_ETW("BrowserMain", 0, "");
NotificationServiceImpl main_notification_service;
diff --git a/content/browser/browser_main.h b/content/browser/browser_main.h
index 86370bb..69a5d62 100644
--- a/content/browser/browser_main.h
+++ b/content/browser/browser_main.h
@@ -9,14 +9,14 @@
#include "base/basictypes.h"
#include "content/common/content_export.h"
-struct MainFunctionParams;
-
namespace content {
+struct MainFunctionParams;
+
bool ExitedMainMessageLoop();
} // namespace content
-CONTENT_EXPORT int BrowserMain(const MainFunctionParams& parameters);
+CONTENT_EXPORT int BrowserMain(const content::MainFunctionParams& parameters);
#endif // CONTENT_BROWSER_BROWSER_MAIN_H_
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index ff12449..6d49467 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -14,11 +14,11 @@
#include "base/tracked_objects.h"
#include "content/browser/browser_thread_impl.h"
#include "content/common/hi_res_timer_manager.h"
-#include "content/common/main_function_params.h"
#include "content/common/sandbox_policy.h"
#include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#include "content/public/common/result_codes.h"
#include "crypto/nss_util.h"
#include "net/base/network_change_notifier.h"
@@ -147,7 +147,7 @@ namespace content {
// BrowserMainLoop construction / destructione =============================
-BrowserMainLoop::BrowserMainLoop(const MainFunctionParams& parameters)
+BrowserMainLoop::BrowserMainLoop(const content::MainFunctionParams& parameters)
: parameters_(parameters),
parsed_command_line_(parameters.command_line),
result_code_(content::RESULT_CODE_NORMAL_EXIT) {
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
index 32d0c58..8642e4f 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -15,8 +15,6 @@ class CommandLine;
class HighResolutionTimerManager;
class MessageLoop;
-struct MainFunctionParams;
-
namespace base {
class SystemMonitor;
}
@@ -29,12 +27,13 @@ namespace content {
class BrowserMainParts;
class BrowserThreadImpl;
+struct MainFunctionParams;
// Implements the main browser loop stages called from |BrowserMain()|.
// See comments in browser_main_parts.h for additional info.
class BrowserMainLoop {
public:
- explicit BrowserMainLoop(const MainFunctionParams& parameters);
+ explicit BrowserMainLoop(const content::MainFunctionParams& parameters);
virtual ~BrowserMainLoop();
void Init();
@@ -51,7 +50,7 @@ class BrowserMainLoop {
void InitializeMainThread();
// Members initialized on construction ---------------------------------------
- const MainFunctionParams& parameters_;
+ const content::MainFunctionParams& parameters_;
const CommandLine& parsed_command_line_;
int result_code_;
diff --git a/content/browser/mock_content_browser_client.cc b/content/browser/mock_content_browser_client.cc
index a2e9e32..c350fab 100644
--- a/content/browser/mock_content_browser_client.cc
+++ b/content/browser/mock_content_browser_client.cc
@@ -24,7 +24,7 @@ MockContentBrowserClient::~MockContentBrowserClient() {
}
void MockContentBrowserClient::CreateBrowserMainParts(
- const MainFunctionParams& parameters,
+ const content::MainFunctionParams& parameters,
std::vector<BrowserMainParts*>* parts_list) {
}
diff --git a/content/browser/mock_content_browser_client.h b/content/browser/mock_content_browser_client.h
index 8152308..1889cc7 100644
--- a/content/browser/mock_content_browser_client.h
+++ b/content/browser/mock_content_browser_client.h
@@ -22,7 +22,7 @@ class MockContentBrowserClient : public ContentBrowserClient {
virtual ~MockContentBrowserClient();
virtual void CreateBrowserMainParts(
- const MainFunctionParams& parameters,
+ const content::MainFunctionParams& parameters,
std::vector<BrowserMainParts*>* parts_list) OVERRIDE;
virtual RenderWidgetHostView* CreateViewForWidget(
RenderWidgetHost* widget) OVERRIDE;
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 6962016..2e791b0 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -38,7 +38,6 @@
#include "content/browser/tab_contents/title_updated_details.h"
#include "content/browser/user_metrics.h"
#include "content/browser/webui/web_ui_factory.h"
-#include "content/common/content_restriction.h"
#include "content/common/intents_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
@@ -46,6 +45,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_constants.h"
+#include "content/public/common/content_restriction.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/view_types.h"
#include "net/base/net_util.h"
diff --git a/content/browser/zygote_main_linux.cc b/content/browser/zygote_main_linux.cc
index 4adb25b..c56d8ea 100644
--- a/content/browser/zygote_main_linux.cc
+++ b/content/browser/zygote_main_linux.cc
@@ -30,7 +30,6 @@
#include "crypto/nss_util.h"
#include "content/common/chrome_descriptors.h"
#include "content/common/font_config_ipc_linux.h"
-#include "content/common/main_function_params.h"
#include "content/common/pepper_plugin_registry.h"
#include "content/common/process_watcher.h"
#include "content/common/sandbox_methods_linux.h"
@@ -38,6 +37,7 @@
#include "content/common/set_process_title.h"
#include "content/common/unix_domain_socket_posix.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/zygote_fork_delegate_linux.h"
#include "skia/ext/SkFontHost_fontconfig_control.h"
@@ -805,7 +805,7 @@ static bool EnterSandbox() {
#endif // CHROMIUM_SELINUX
-bool ZygoteMain(const MainFunctionParams& params,
+bool ZygoteMain(const content::MainFunctionParams& params,
content::ZygoteForkDelegate* forkdelegate) {
#if !defined(CHROMIUM_SELINUX)
g_am_zygote_or_renderer = true;
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 505846d..46ee9ce 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -33,12 +33,14 @@
'public/common/content_constants.cc',
'public/common/content_constants.h',
'public/common/content_paths.h',
+ 'public/common/content_restriction.h',
'public/common/content_switches.cc',
'public/common/content_switches.h',
'public/common/dx_diag_node.cc',
'public/common/dx_diag_node.h',
'public/common/gpu_info.cc',
'public/common/gpu_info.h',
+ 'public/common/main_function_params.h',
'public/common/page_transition_types.cc',
'public/common/page_transition_types.h',
'public/common/page_type.h',
@@ -87,7 +89,6 @@
'common/content_counters.cc',
'common/content_counters.h',
'common/content_paths.cc',
- 'common/content_restriction.h',
'common/css_colors.h',
'common/database_messages.h',
'common/database_util.cc',
@@ -157,7 +158,6 @@
'common/mac/font_descriptor.mm',
'common/mac/font_loader.h',
'common/mac/font_loader.mm',
- 'common/main_function_params.h',
'common/media/audio_messages.h',
'common/media/audio_stream_state.h',
'common/media/media_stream_messages.h',
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index a4bb494..48ff837 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -15,8 +15,8 @@
#include "base/win/scoped_com_initializer.h"
#include "build/build_config.h"
#include "content/common/gpu/gpu_config.h"
-#include "content/common/main_function_params.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#include "content/gpu/gpu_child_thread.h"
#include "content/gpu/gpu_process.h"
#include "ui/gfx/gl/gl_surface.h"
@@ -33,7 +33,7 @@
#endif
// Main function for starting the Gpu process.
-int GpuMain(const MainFunctionParams& parameters) {
+int GpuMain(const content::MainFunctionParams& parameters) {
base::Time start_time = base::Time::Now();
const CommandLine& command_line = parameters.command_line;
diff --git a/content/plugin/plugin_main.cc b/content/plugin/plugin_main.cc
index 8a5d0ff..8e8b1ea 100644
--- a/content/plugin/plugin_main.cc
+++ b/content/plugin/plugin_main.cc
@@ -16,9 +16,9 @@
#include "base/threading/platform_thread.h"
#include "content/common/child_process.h"
#include "content/common/hi_res_timer_manager.h"
-#include "content/common/main_function_params.h"
#include "content/plugin/plugin_thread.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#if defined(OS_WIN)
#include "content/common/injection_test_dll.h"
@@ -75,7 +75,7 @@ int PreloadIMEForFlash() {
#endif
// main() routine for running as the plugin process.
-int PluginMain(const MainFunctionParams& parameters) {
+int PluginMain(const content::MainFunctionParams& parameters) {
// The main thread of the plugin services UI.
#if defined(OS_MACOSX)
#if !defined(__LP64__)
diff --git a/content/ppapi_plugin/ppapi_broker_main.cc b/content/ppapi_plugin/ppapi_broker_main.cc
index f2a546e..7963e29 100644
--- a/content/ppapi_plugin/ppapi_broker_main.cc
+++ b/content/ppapi_plugin/ppapi_broker_main.cc
@@ -6,12 +6,12 @@
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#include "content/common/child_process.h"
-#include "content/common/main_function_params.h"
#include "content/ppapi_plugin/ppapi_thread.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
// Main function for starting the PPAPI broker process.
-int PpapiBrokerMain(const MainFunctionParams& parameters) {
+int PpapiBrokerMain(const content::MainFunctionParams& parameters) {
const CommandLine& command_line = parameters.command_line;
if (command_line.HasSwitch(switches::kPpapiStartupDialog)) {
ChildProcess::WaitForDebugger("PpapiBroker");
diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc
index 11d771d..1b0d2ee 100644
--- a/content/ppapi_plugin/ppapi_plugin_main.cc
+++ b/content/ppapi_plugin/ppapi_plugin_main.cc
@@ -8,9 +8,9 @@
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#include "content/common/child_process.h"
-#include "content/common/main_function_params.h"
#include "content/ppapi_plugin/ppapi_thread.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#include "ppapi/proxy/proxy_module.h"
#if defined(OS_WIN)
@@ -28,7 +28,7 @@ void* g_target_services = 0;
#endif
// Main function for starting the PPAPI plugin process.
-int PpapiPluginMain(const MainFunctionParams& parameters) {
+int PpapiPluginMain(const content::MainFunctionParams& parameters) {
const CommandLine& command_line = parameters.command_line;
#if defined(OS_WIN)
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index e8e2fde..6fd40b0 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -10,11 +10,10 @@
#include "build/build_config.h"
-struct MainFunctionParams;
-
namespace content {
class ZygoteForkDelegate;
+struct MainFunctionParams;
class ContentMainDelegate {
public:
@@ -36,8 +35,9 @@ class ContentMainDelegate {
virtual void SandboxInitialized(const std::string& process_type) = 0;
// Asks the embedder to start a process that content doesn't know about.
- virtual int RunProcess(const std::string& process_type,
- const MainFunctionParams& main_function_params) = 0;
+ virtual int RunProcess(
+ const std::string& process_type,
+ const content::MainFunctionParams& main_function_params) = 0;
// Called right before the process exits.
virtual void ProcessExiting(const std::string& process_type) = 0;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 4d4f1ad..8ec5549 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -35,11 +35,11 @@ class TabContents;
class TabContentsView;
class WorkerProcessHost;
struct DesktopNotificationHostMsg_Show_Params;
-struct MainFunctionParams;
struct WebPreferences;
namespace content {
class BrowserMainParts;
+struct MainFunctionParams;
}
namespace crypto {
@@ -86,7 +86,7 @@ class ContentBrowserClient {
// implementations for the browser startup code. See comments in
// browser_main_parts.h.
virtual void CreateBrowserMainParts(
- const MainFunctionParams& parameters,
+ const content::MainFunctionParams& parameters,
std::vector<BrowserMainParts*>* parts_list) = 0;
// Platform-specific creator. Use this to construct new RenderWidgetHostViews
diff --git a/content/common/content_restriction.h b/content/public/common/content_restriction.h
index 1497939..3ea577d 100644
--- a/content/common/content_restriction.h
+++ b/content/public/common/content_restriction.h
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_COMMON_CONTENT_RESTRICTION_H_
-#define CONTENT_COMMON_CONTENT_RESTRICTION_H_
+#ifndef CONTENT_PUBLIC_COMMON_CONTENT_RESTRICTION_H_
+#define CONTENT_PUBLIC_COMMON_CONTENT_RESTRICTION_H_
#pragma once
+namespace content {
+
// Used by a full-page plugin to disable browser commands because of
// restrictions on how the data is to be used (i.e. can't copy/print).
enum ContentRestriction {
@@ -16,4 +18,6 @@ enum ContentRestriction {
CONTENT_RESTRICTION_SAVE = 1 << 4
};
-#endif // CONTENT_COMMON_CONTENT_RESTRICTION_H_
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_CONTENT_RESTRICTION_H_
diff --git a/content/common/main_function_params.h b/content/public/common/main_function_params.h
index 1b6323f..2a8a16d 100644
--- a/content/common/main_function_params.h
+++ b/content/public/common/main_function_params.h
@@ -6,8 +6,8 @@
// plugin) to shield the call sites from the differences between platforms
// (e.g., POSIX doesn't need to pass any sandbox information).
-#ifndef CONTENT_COMMON_MAIN_FUNCTION_PARAMS_H_
-#define CONTENT_COMMON_MAIN_FUNCTION_PARAMS_H_
+#ifndef CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_
+#define CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_
#pragma once
#include "base/command_line.h"
@@ -26,6 +26,8 @@ class ScopedNSAutoreleasePool;
class Task;
+namespace content {
+
struct MainFunctionParams {
explicit MainFunctionParams(const CommandLine& cl)
: command_line(cl),
@@ -46,4 +48,6 @@ struct MainFunctionParams {
Task* ui_task;
};
-#endif // CONTENT_COMMON_MAIN_FUNCTION_PARAMS_H_
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_MAIN_FUNCTION_PARAMS_H_
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 8d21de0..4661780 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -17,10 +17,10 @@
#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "content/common/content_counters.h"
-#include "content/common/main_function_params.h"
#include "content/common/hi_res_timer_manager.h"
#include "content/common/pepper_plugin_registry.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#include "content/renderer/render_process_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/renderer_main_platform_delegate.h"
@@ -121,7 +121,7 @@ class RendererMessageLoopObserver : public MessageLoop::TaskObserver {
};
// mainline routine for running as the Renderer process
-int RendererMain(const MainFunctionParams& parameters) {
+int RendererMain(const content::MainFunctionParams& parameters) {
TRACE_EVENT_BEGIN_ETW("RendererMain", 0, "");
const CommandLine& parsed_command_line = parameters.command_line;
diff --git a/content/renderer/renderer_main_platform_delegate.h b/content/renderer/renderer_main_platform_delegate.h
index b98eb0a..e8b5db9 100644
--- a/content/renderer/renderer_main_platform_delegate.h
+++ b/content/renderer/renderer_main_platform_delegate.h
@@ -14,7 +14,7 @@
#include "base/basictypes.h"
#include "content/common/content_export.h"
-#include "content/common/main_function_params.h"
+#include "content/public/common/main_function_params.h"
#ifdef __OBJC__
@class NSBundle;
@@ -24,7 +24,8 @@ class NSBundle;
class CONTENT_EXPORT RendererMainPlatformDelegate {
public:
- explicit RendererMainPlatformDelegate(const MainFunctionParams& parameters);
+ explicit RendererMainPlatformDelegate(
+ const content::MainFunctionParams& parameters);
~RendererMainPlatformDelegate();
// Called first thing and last thing in the process' lifecycle, i.e. before
@@ -43,7 +44,7 @@ class CONTENT_EXPORT RendererMainPlatformDelegate {
void RunSandboxTests();
private:
- const MainFunctionParams& parameters_;
+ const content::MainFunctionParams& parameters_;
#if defined(OS_WIN)
HMODULE sandbox_test_module_;
#elif defined(OS_MACOSX)
diff --git a/content/renderer/renderer_main_platform_delegate_linux.cc b/content/renderer/renderer_main_platform_delegate_linux.cc
index d990a7f..546cd5a 100644
--- a/content/renderer/renderer_main_platform_delegate_linux.cc
+++ b/content/renderer/renderer_main_platform_delegate_linux.cc
@@ -9,7 +9,7 @@
#include "content/public/common/content_switches.h"
RendererMainPlatformDelegate::RendererMainPlatformDelegate(
- const MainFunctionParams& parameters)
+ const content::MainFunctionParams& parameters)
: parameters_(parameters) {
}
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
index c430733..68685c4 100644
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
@@ -18,7 +18,7 @@
#include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
RendererMainPlatformDelegate::RendererMainPlatformDelegate(
- const MainFunctionParams& parameters)
+ const content::MainFunctionParams& parameters)
: parameters_(parameters) {
}
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
index c917f0d..67a563d 100644
--- a/content/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -62,7 +62,7 @@ void EnableThemeSupportForRenderer(bool no_sandbox) {
} // namespace
RendererMainPlatformDelegate::RendererMainPlatformDelegate(
- const MainFunctionParams& parameters)
+ const content::MainFunctionParams& parameters)
: parameters_(parameters),
sandbox_test_module_(NULL) {
}
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc
index 7058cff..a336404 100644
--- a/content/shell/shell_browser_main.cc
+++ b/content/shell/shell_browser_main.cc
@@ -20,7 +20,7 @@
namespace content {
ShellBrowserMainParts::ShellBrowserMainParts(
- const MainFunctionParams& parameters)
+ const content::MainFunctionParams& parameters)
: BrowserMainParts() {
ShellContentBrowserClient* shell_browser_client =
static_cast<ShellContentBrowserClient*>(
diff --git a/content/shell/shell_browser_main.h b/content/shell/shell_browser_main.h
index 7e43d88..55f725a 100644
--- a/content/shell/shell_browser_main.h
+++ b/content/shell/shell_browser_main.h
@@ -11,7 +11,6 @@
#include "content/public/browser/browser_main_parts.h"
class ResourceDispatcherHost;
-struct MainFunctionParams;
namespace base {
class Thread;
@@ -24,10 +23,11 @@ class Clipboard;
namespace content {
class ShellBrowserContext;
+struct MainFunctionParams;
class ShellBrowserMainParts : public BrowserMainParts {
public:
- explicit ShellBrowserMainParts(const MainFunctionParams& parameters);
+ explicit ShellBrowserMainParts(const content::MainFunctionParams& parameters);
virtual ~ShellBrowserMainParts();
virtual void PreEarlyInitialization() OVERRIDE {}
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index 2b22709..18aae4e 100644
--- a/content/shell/shell_content_browser_client.cc
+++ b/content/shell/shell_content_browser_client.cc
@@ -29,7 +29,7 @@ ShellContentBrowserClient::~ShellContentBrowserClient() {
}
void ShellContentBrowserClient::CreateBrowserMainParts(
- const MainFunctionParams& parameters,
+ const content::MainFunctionParams& parameters,
std::vector<BrowserMainParts*>* parts_list) {
parts_list->push_back(new ShellBrowserMainParts(parameters));
}
diff --git a/content/shell/shell_content_browser_client.h b/content/shell/shell_content_browser_client.h
index 886dc00..382b207 100644
--- a/content/shell/shell_content_browser_client.h
+++ b/content/shell/shell_content_browser_client.h
@@ -34,7 +34,7 @@ class ShellContentBrowserClient : public ContentBrowserClient
}
virtual void CreateBrowserMainParts(
- const MainFunctionParams& parameters,
+ const content::MainFunctionParams& parameters,
std::vector<BrowserMainParts*>* parts_list) OVERRIDE;
virtual RenderWidgetHostView* CreateViewForWidget(
RenderWidgetHost* widget) OVERRIDE;
diff --git a/content/shell/shell_main_delegate.cc b/content/shell/shell_main_delegate.cc
index 05c50fb..fb79904 100644
--- a/content/shell/shell_main_delegate.cc
+++ b/content/shell/shell_main_delegate.cc
@@ -35,7 +35,7 @@ void ShellMainDelegate::SandboxInitialized(const std::string& process_type) {
int ShellMainDelegate::RunProcess(
const std::string& process_type,
- const MainFunctionParams& main_function_params) {
+ const content::MainFunctionParams& main_function_params) {
NOTREACHED();
return -1;
}
diff --git a/content/shell/shell_main_delegate.h b/content/shell/shell_main_delegate.h
index 316d0b7..ee5922b 100644
--- a/content/shell/shell_main_delegate.h
+++ b/content/shell/shell_main_delegate.h
@@ -28,7 +28,7 @@ class ShellMainDelegate : public content::ContentMainDelegate {
virtual void SandboxInitialized(const std::string& process_type) OVERRIDE;
virtual int RunProcess(
const std::string& process_type,
- const MainFunctionParams& main_function_params) OVERRIDE;
+ const content::MainFunctionParams& main_function_params) OVERRIDE;
virtual void ProcessExiting(const std::string& process_type) OVERRIDE;
#if defined(OS_MACOSX)
virtual bool ProcessRegistersWithSystemProcess(
diff --git a/content/test/browser_test_base.cc b/content/test/browser_test_base.cc
index d1f89f8..a6a3092 100644
--- a/content/test/browser_test_base.cc
+++ b/content/test/browser_test_base.cc
@@ -6,7 +6,7 @@
#include "base/command_line.h"
#include "base/task.h"
-#include "content/common/main_function_params.h"
+#include "content/public/common/main_function_params.h"
#include "sandbox/src/dep.h"
#if defined(OS_MACOSX)
@@ -14,7 +14,7 @@
#include "base/system_monitor/system_monitor.h"
#endif
-extern int BrowserMain(const MainFunctionParams&);
+extern int BrowserMain(const content::MainFunctionParams&);
BrowserTestBase::BrowserTestBase() {
#if defined(OS_MACOSX)
@@ -27,7 +27,7 @@ BrowserTestBase::~BrowserTestBase() {
}
void BrowserTestBase::SetUp() {
- MainFunctionParams params(*CommandLine::ForCurrentProcess());
+ content::MainFunctionParams params(*CommandLine::ForCurrentProcess());
params.ui_task =
NewRunnableMethod(this, &BrowserTestBase::ProxyRunTestOnMainThreadLoop);
diff --git a/content/test/render_view_test.cc b/content/test/render_view_test.cc
index eacb390..224733b 100644
--- a/content/test/render_view_test.cc
+++ b/content/test/render_view_test.cc
@@ -97,7 +97,7 @@ void RenderViewTest::SetUp() {
render_thread_->set_routing_id(kRouteId);
command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM));
- params_.reset(new MainFunctionParams(*command_line_));
+ params_.reset(new content::MainFunctionParams(*command_line_));
platform_.reset(new RendererMainPlatformDelegate(*params_));
platform_->PlatformInitialize();
diff --git a/content/test/render_view_test.h b/content/test/render_view_test.h
index e2b995a..436d594 100644
--- a/content/test/render_view_test.h
+++ b/content/test/render_view_test.h
@@ -11,8 +11,8 @@
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "content/common/main_function_params.h"
#include "content/public/browser/native_web_keyboard_event.h"
+#include "content/public/common/main_function_params.h"
#include "content/renderer/mock_content_renderer_client.h"
#include "content/renderer/renderer_webkitplatformsupport_impl.h"
#include "content/test/mock_keyboard.h"
@@ -123,7 +123,7 @@ class RenderViewTest : public testing::Test {
// Used to setup the process so renderers can run.
scoped_ptr<RendererMainPlatformDelegate> platform_;
- scoped_ptr<MainFunctionParams> params_;
+ scoped_ptr<content::MainFunctionParams> params_;
scoped_ptr<CommandLine> command_line_;
};
diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc
index ccbdc65..acbd799 100644
--- a/content/utility/utility_main.cc
+++ b/content/utility/utility_main.cc
@@ -8,8 +8,8 @@
#include "base/threading/platform_thread.h"
#include "content/common/child_process.h"
#include "content/common/hi_res_timer_manager.h"
-#include "content/common/main_function_params.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/main_function_params.h"
#include "content/utility/utility_thread_impl.h"
#if defined(OS_WIN)
@@ -17,7 +17,7 @@
#endif
// Mainline routine for running as the utility process.
-int UtilityMain(const MainFunctionParams& parameters) {
+int UtilityMain(const content::MainFunctionParams& parameters) {
// The main message loop of the utility process.
MessageLoop main_message_loop;
base::PlatformThread::SetName("CrUtilityMain");
diff --git a/content/worker/worker_main.cc b/content/worker/worker_main.cc
index 8182a23..47c7a58 100644
--- a/content/worker/worker_main.cc
+++ b/content/worker/worker_main.cc
@@ -10,7 +10,7 @@
#include "base/threading/platform_thread.h"
#include "content/common/child_process.h"
#include "content/common/hi_res_timer_manager.h"
-#include "content/common/main_function_params.h"
+#include "content/public/common/main_function_params.h"
#include "content/worker/worker_thread.h"
#if defined(OS_WIN)
@@ -19,7 +19,7 @@
#endif
// Mainline routine for running as the worker process.
-int WorkerMain(const MainFunctionParams& parameters) {
+int WorkerMain(const content::MainFunctionParams& parameters) {
// The main message loop of the worker process.
MessageLoop main_message_loop;
base::PlatformThread::SetName("CrWorkerMain");