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

Unified Diff: win8/delegate_execute/delegate_execute_operation.h

Issue 10875008: Integrate the Windows 8 code into the Chromium tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove conflicting OWNERS file. 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.rgs ('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
new file mode 100644
index 0000000000000000000000000000000000000000..59acfd7a2723f79d1a1bd3285d0ffeb94cf4c87a
--- /dev/null
+++ b/win8/delegate_execute/delegate_execute_operation.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2012 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 WIN8_DELEGATE_EXECUTE_DELEGATE_EXECUTE_OPERATION_H_
+#define WIN8_DELEGATE_EXECUTE_DELEGATE_EXECUTE_OPERATION_H_
+
+#include <atldef.h>
+
+#include "base/basictypes.h"
+#include "base/file_path.h"
+
+class CommandLine;
+
+namespace delegate_execute {
+
+// Parses a portion of the DelegateExecute handler's command line to determine
+// the desired operation.
+class DelegateExecuteOperation {
+ public:
+ enum OperationType {
+ EXE_MODULE,
+ RELAUNCH_CHROME,
+ };
+
+ DelegateExecuteOperation();
+ ~DelegateExecuteOperation();
+
+ void Initialize(const CommandLine* command_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);
+ return relaunch_shortcut_;
+ }
+
+ private:
+ void Clear();
+
+ OperationType operation_type_;
+ FilePath relaunch_shortcut_;
+ DISALLOW_COPY_AND_ASSIGN(DelegateExecuteOperation);
+};
+
+} // namespace delegate_execute
+
+#endif // WIN8_DELEGATE_EXECUTE_DELEGATE_EXECUTE_OPERATION_H_
« no previous file with comments | « win8/delegate_execute/delegate_execute.rgs ('k') | win8/delegate_execute/delegate_execute_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698