summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_launcher.h
diff options
context:
space:
mode:
authorslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 05:11:58 +0000
committerslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 05:11:58 +0000
commitf781782dd67077478e117c61dca4ea5eefce3544 (patch)
tree4801f724123cfdcbb69c4e7fe40a565b331723ae /chrome_frame/chrome_launcher.h
parent63cf4759efa2373e33436fb5df6849f930081226 (diff)
downloadchromium_src-f781782dd67077478e117c61dca4ea5eefce3544.zip
chromium_src-f781782dd67077478e117c61dca4ea5eefce3544.tar.gz
chromium_src-f781782dd67077478e117c61dca4ea5eefce3544.tar.bz2
Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming in a separate CL.
BUG=None TEST=None Review URL: http://codereview.chromium.org/218019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_launcher.h')
-rw-r--r--chrome_frame/chrome_launcher.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/chrome_frame/chrome_launcher.h b/chrome_frame/chrome_launcher.h
new file mode 100644
index 0000000..72b198a
--- /dev/null
+++ b/chrome_frame/chrome_launcher.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2009 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.
+
+#ifndef CHROME_FRAME_CHROME_LAUNCHER_H_
+#define CHROME_FRAME_CHROME_LAUNCHER_H_
+
+#include <string>
+
+class CommandLine;
+
+namespace chrome_launcher {
+
+// The base name of the chrome_launcher.exe file.
+extern const wchar_t kLauncherExeBaseName[];
+
+// Creates a command line suitable for launching Chrome. You can add any
+// flags needed before launching.
+//
+// The command-line may use the Chrome executable directly, or use an in-between
+// process if needed for security/elevation purposes. You must delete the
+// returned command line.
+CommandLine* CreateLaunchCommandLine();
+
+// Fills in a new command line from the flags on this process's command line
+// that we are allowing Low Integrity to invoke.
+//
+// Logs a warning for any flags that were passed that are not allowed to be
+// invoked by Low Integrity.
+void SanitizeCommandLine(const CommandLine& original, CommandLine* sanitized);
+
+// Given a command-line without an initial program part, launch our associated
+// chrome.exe with a sanitized version of that command line. Returns true iff
+// successful.
+bool SanitizeAndLaunchChrome(const wchar_t* command_line);
+
+// Returns the full path to the Chrome executable.
+std::wstring GetChromeExecutablePath();
+
+// The type of the CfLaunchChrome entrypoint exported from this DLL.
+typedef int (__stdcall *CfLaunchChromeProc)();
+
+} // namespace chrome_launcher
+
+#endif // CHROME_FRAME_CHROME_LAUNCHER_H_