summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 23:32:06 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 23:32:06 +0000
commit6cef59c4b68f538e67ae458e47f92975e253cb72 (patch)
tree64e8d6855ca9279ec1a6b5afda50ff47d4cfa059 /chrome
parentf67019ad2da4b89380a209e466fad006dc977ae5 (diff)
downloadchromium_src-6cef59c4b68f538e67ae458e47f92975e253cb72.zip
chromium_src-6cef59c4b68f538e67ae458e47f92975e253cb72.tar.gz
chromium_src-6cef59c4b68f538e67ae458e47f92975e253cb72.tar.bz2
Create a stub chrome executable that crashes when run.
This is mostly making sure we have all the symbols we need. Review URL: http://codereview.chromium.org/19683 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8930 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/SConscript44
-rw-r--r--chrome/app/chrome_exe_main.mm2
-rw-r--r--chrome/app/chrome_exe_main_gtk.cc34
-rw-r--r--chrome/browser/browser.scons15
-rw-r--r--chrome/browser/browser_main_gtk.cc35
-rw-r--r--chrome/common/common.scons5
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc9
7 files changed, 119 insertions, 25 deletions
diff --git a/chrome/SConscript b/chrome/SConscript
index 02ae773..715786c 100644
--- a/chrome/SConscript
+++ b/chrome/SConscript
@@ -143,14 +143,6 @@ env_dll.Prepend(
'CHROME_PNG_WRITE_SUPPORT',
'LIBXSLT_STATIC',
'LIBXML_STATIC',
- '_WINDLL',
- 'BROWSER_DLL',
- 'RENDERER_DLL',
- 'PLUGIN_DLL',
- ],
- CCFLAGS = [
- '/TP',
- '/Wp64',
],
)
@@ -182,7 +174,6 @@ env_dll.Append(
'modp_b64',
'zlib',
- 'activex_shim',
'WTF',
'V8Bindings',
'WebCore',
@@ -196,12 +187,10 @@ env_dll.Append(
'debugger',
'common',
'util',
- #'jscre',
'plugin',
'renderer',
'hunspell',
- # TODO(sgk): Windows doesn't use libevent, revisit when Linux gets here
- #'libevent',
+ 'sdch',
'sqlite',
'views',
'v8_snapshot',
@@ -210,9 +199,19 @@ env_dll.Append(
if env_dll.Bit('windows'):
env_dll.Append(
+ CCFLAGS = [
+ '/TP',
+ '/Wp64',
+ ],
+ CPPDEFINES = [
+ '_WINDLL',
+ 'CHROME_DLL',
+ 'BROWSER_DLL',
+ 'RENDERER_DLL',
+ 'PLUGIN_DLL',
+ ],
LIBS = [
- # TODO(sgk): to be ported to Mac and Linux
- 'sdch',
+ 'activex_shim',
#'comctl32.lib',
#'dwmapi.lib',
@@ -288,7 +287,6 @@ input_files = ChromeFileList([
'app/chrome_dll_main.cc',
])
-# TODO(port)
if env_dll.Bit('windows'):
additional = [
'$V8_DIR/snapshot-empty$OBJSUFFIX'
@@ -325,6 +323,20 @@ if env_dll.Bit('windows'):
install_targets.extend(chrome_dll_version_rc)
install_targets.extend(chrome_dll_version_res)
+if env_dll.Bit('linux'):
+ input_files = [
+ 'app/chrome_dll_main.cc',
+ 'app/chrome_exe_main_gtk.cc',
+ ]
+
+ env_dll.Append(
+ LIBS = [
+ 'event',
+ ]
+ )
+ chrome = env_dll.ChromeProgram('app/chrome', input_files)
+
+
p = env.ChromeMSVSProject('app/chrome_dll.vcproj',
dest='$CHROME_SRC_DIR/chrome/app/chrome_dll.vcproj',
guid='{C0A7EE2C-2A6D-45BE-BA78-6D006FDF52D9}',
@@ -517,7 +529,7 @@ input_files = ChromeFileList([
'app/result_codes.h',
])
-# TODO(port)
+# We only use a separate exe/dll on Windows.
if env.Bit('windows'):
chrome_exe = env_exe.ChromeProgram('chrome_exe/chrome', input_files)
diff --git a/chrome/app/chrome_exe_main.mm b/chrome/app/chrome_exe_main.mm
index 3c9381f..aea88ef 100644
--- a/chrome/app/chrome_exe_main.mm
+++ b/chrome/app/chrome_exe_main.mm
@@ -9,7 +9,7 @@
// The entry point for all invocations of Chromium, browser and renderer. On
// windows, this does nothing but load chrome.dll and invoke its entry point
-// in order to make it easy to update the app from Omaha. We don't need
+// in order to make it easy to update the app from GoogleUpdate. We don't need
// that extra layer with Keystone on the Mac, though we may run into issues
// with Keychain prompts unless we sign the application. That shouldn't be
// too hard, we just need infrastructure support to do it.
diff --git a/chrome/app/chrome_exe_main_gtk.cc b/chrome/app/chrome_exe_main_gtk.cc
new file mode 100644
index 0000000..c455230
--- /dev/null
+++ b/chrome/app/chrome_exe_main_gtk.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/at_exit.h"
+#include "base/process_util.h"
+
+// The entry point for all invocations of Chromium, browser and renderer. On
+// windows, this does nothing but load chrome.dll and invoke its entry point in
+// order to make it easy to update the app from GoogleUpdate. We don't need
+// that extra layer with on linux.
+//
+// TODO(tc): This is similar to chrome_exe_main.mm. After it's more clear what
+// needs to go here, we should evaluate whether or not to merge this file with
+// chrome_exe_main.mm.
+
+extern "C" {
+int ChromeMain(int argc, const char** argv);
+}
+
+int main(int argc, const char** argv) {
+ base::EnableTerminationOnHeapCorruption();
+
+ // The exit manager is in charge of calling the dtors of singletons.
+ // Win has one here, but we assert with multiples from BrowserMain() if we
+ // keep it.
+ // base::AtExitManager exit_manager;
+
+#if defined(GOOGLE_CHROME_BUILD)
+ // TODO(tc): init crash reporter
+#endif
+
+ return ChromeMain(argc, argv);
+}
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 8951bba..0fc702f 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -524,8 +524,8 @@ input_files = ChromeFileList([
'renderer_host/download_resource_handler.h',
'renderer_host/download_throttling_resource_handler.cc',
'renderer_host/download_throttling_resource_handler.h',
- 'renderer_host/browser_render_process_host.cc',
- 'renderer_host/browser_render_process_host.h',
+ 'renderer_host/render_process_host.cc',
+ 'renderer_host/render_process_host.h',
'renderer_host/render_view_host.cc',
'renderer_host/render_view_host.h',
'renderer_host/render_view_host_delegate.h',
@@ -698,7 +698,6 @@ if not env.Bit('windows'):
'cert_store.cc',
'character_encoding.cc',
'chrome_plugin_host.cc',
- 'command_updater.cc',
'dock_info.cc',
'dom_ui/dom_ui_contents.cc',
'dom_ui/dom_ui_host.cc',
@@ -764,8 +763,6 @@ if not env.Bit('windows'):
'printing/printed_page.cc',
'printing/printer_query.cc',
'printing/win_printing_context.cc',
- 'profile.cc',
- 'profile_manager.cc',
'renderer_host/render_view_host.cc',
'renderer_host/render_widget_helper.cc',
'renderer_host/render_widget_host.cc',
@@ -809,8 +806,6 @@ if not env.Bit('windows'):
'tab_contents/web_contents_view.cc',
'tab_contents/web_drag_source.cc',
'tab_contents/web_drop_target.cc',
- 'tabs/tab_strip_model.cc',
- 'tabs/tab_strip_model_order_controller.cc',
'task_manager.cc',
'task_manager_resource_providers.cc',
'toolbar_model.cc',
@@ -834,10 +829,14 @@ if not env.Bit('windows'):
'../tools/build/win/precompiled_wtl.h',
)
+if env.Bit('linux'):
+ input_files.Extend([
+ 'browser_main_gtk.cc',
+ ])
+
if env.Bit('windows'):
env.TypeLibrary('history/history_indexer.idl')
-if not env.Bit('posix'):
input_files.Remove(
'importer/firefox_profile_lock_posix.cc',
)
diff --git a/chrome/browser/browser_main_gtk.cc b/chrome/browser/browser_main_gtk.cc
new file mode 100644
index 0000000..b7e8360
--- /dev/null
+++ b/chrome/browser/browser_main_gtk.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/command_line.h"
+#include "chrome/app/result_codes.h"
+#include "chrome/browser/browser_main_win.h"
+
+// From browser_main_win.h, stubs until we figure out the right thing...
+
+int DoUninstallTasks() {
+ return ResultCodes::NORMAL_EXIT;
+}
+
+bool DoUpgradeTasks(const CommandLine& command_line) {
+ return ResultCodes::NORMAL_EXIT;
+}
+
+bool CheckForWin2000() {
+ return false;
+}
+
+int HandleIconsCommands(const CommandLine &parsed_command_line) {
+ return 0;
+}
+
+bool CheckMachineLevelInstall() {
+ return false;
+}
+
+void PrepareRestartOnCrashEnviroment(const CommandLine &parsed_command_line) {
+}
+
+void RecordBreakpadStatusUMA(MetricsService* metrics) {
+}
diff --git a/chrome/common/common.scons b/chrome/common/common.scons
index eedbd94..93fc73f 100644
--- a/chrome/common/common.scons
+++ b/chrome/common/common.scons
@@ -206,6 +206,11 @@ input_files = ChromeFileList([
])
if not env.Bit('windows'):
+ # TODO(port): This is temporary so we can link.
+ input_files.Append(
+ 'temp_scaffolding_stubs.cc'
+ )
+
# TODO(port): Port these.
input_files.Remove(
'chrome_plugin_util.cc',
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 2aefd59..bb96f59 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -8,6 +8,7 @@
#include "base/thread.h"
#include "base/path_service.h"
#include "base/singleton.h"
+#include "build/build_config.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/history/in_memory_history_backend.h"
@@ -231,10 +232,18 @@ bool RLZTracker::RecordProductEvent(Product product, AccessPoint point,
return false;
}
+#if defined(OS_MACOSX)
// We link this in for now to avoid hauling in all of WebCore (which we will
// have to eventually do)
namespace webkit_glue {
std::string GetUserAgent(const GURL& url) {
return "";
}
+#endif
+
+#if defined(OS_LINUX)
+BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
+ NOTIMPLEMENTED() << "CreateBrowserWindow";
+ return NULL;
}
+#endif