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

Unified Diff: win8/delegate_execute/delegate_execute_operation.h

Issue 10914160: Manually merging remaining Win8 changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « win8/delegate_execute/delegate_execute.cc ('k') | win8/delegate_execute/delegate_execute_operation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win8/delegate_execute/delegate_execute_operation.h
diff --git a/win8/delegate_execute/delegate_execute_operation.h b/win8/delegate_execute/delegate_execute_operation.h
index 59acfd7a2723f79d1a1bd3285d0ffeb94cf4c87a..f2f01ccef613c7470e2b7e73ab872188e2522c78 100644
--- a/win8/delegate_execute/delegate_execute_operation.h
+++ b/win8/delegate_execute/delegate_execute_operation.h
@@ -6,44 +6,70 @@
#define WIN8_DELEGATE_EXECUTE_DELEGATE_EXECUTE_OPERATION_H_
#include <atldef.h>
+#include <windows.h>
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/string16.h"
class CommandLine;
namespace delegate_execute {
// Parses a portion of the DelegateExecute handler's command line to determine
-// the desired operation.
+// the desired operation. The operation type is decided by looking at the
+// command line. The operations are:
+// DELEGATE_EXECUTE:
+// When the delegate_execute.exe is invoked by windows when a chrome
+// activation via the shell, possibly using ShellExecute. Control must
+// be given to ATLs WinMain.
+// RELAUNCH_CHROME:
+// When the delegate_execute.exe is launched by chrome, when chrome needs
+// to re-launch itself. The required command line parameters are:
+// --relaunch-shortcut=<PathToShortcut>
+// --wait-for-mutex=<MutexNamePid>
+// The PathToShortcut must be the fully qualified file name to the chrome
+// shortcut that has the appId and other 'metro ready' parameters.
+// The MutexNamePid is a mutex name that also encodes the process id and
+// must follow the format <A>.<B>.<pid> where A and B are arbitray strings
+// (usually chrome.relaunch) and pid is the process id of chrome.
class DelegateExecuteOperation {
public:
enum OperationType {
- EXE_MODULE,
+ DELEGATE_EXECUTE,
RELAUNCH_CHROME,
};
DelegateExecuteOperation();
~DelegateExecuteOperation();
- void Initialize(const CommandLine* command_line);
+ bool Init(const CommandLine* cmd_line);
OperationType operation_type() const {
return operation_type_;
}
- // Returns the argument to the --relaunch-shortcut switch. Valid only when
- // the operation is RELAUNCH_CHROME.
- const FilePath& relaunch_shortcut() const {
- ATLASSERT(operation_type_ == RELAUNCH_CHROME);
+ const char* relaunch_flags() const {
+ return relaunch_flags_;
+ }
+
+ const string16& mutex() const {
+ return mutex_;
+ }
+
+ // Returns the process id of the parent or 0 on failure.
+ DWORD GetParentPid() const;
+
+ const FilePath& shortcut() const {
return relaunch_shortcut_;
}
private:
- void Clear();
-
OperationType operation_type_;
+ const char* relaunch_flags_;
FilePath relaunch_shortcut_;
+ string16 mutex_;
+
DISALLOW_COPY_AND_ASSIGN(DelegateExecuteOperation);
};
« no previous file with comments | « win8/delegate_execute/delegate_execute.cc ('k') | win8/delegate_execute/delegate_execute_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698