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

Unified Diff: ios/chrome/app/application_step.h

Issue 2580363002: Upstream Chrome on iOS source code [1/11]. (Closed)
Patch Set: Created 4 years 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 | « ios/chrome/app/application_state.mm ('k') | ios/chrome/app/chrome_app_startup_parameters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/application_step.h
diff --git a/ios/chrome/app/application_step.h b/ios/chrome/app/application_step.h
new file mode 100644
index 0000000000000000000000000000000000000000..f392b9686fd52141959185463b22b74c0891ac14
--- /dev/null
+++ b/ios/chrome/app/application_step.h
@@ -0,0 +1,30 @@
+// Copyright 2016 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.
+
+// ====== New Architecture =====
+// = This code is only used in the new iOS Chrome architecture. =
+// ============================================================================
+
+#ifndef IOS_CHROME_APP_APPLICATION_STEP_H_
+#define IOS_CHROME_APP_APPLICATION_STEP_H_
+
+#import <Foundation/Foundation.h>
+
+@class ApplicationState;
+
+// Objects that perform application state change steps must conform to this
+// protocol.
+@protocol ApplicationStep<NSObject>
+// Implementors should not modify |state| in -canRunInState.
+- (BOOL)canRunInState:(ApplicationState*)state;
+
+// Implementors should expect to be deallocated after -runInState is called.
+// If an implementor creates objects that need to persist longer than that, they
+// should be stored in |state.state|.
+// Implementors can assume that they are not in any of |state|'s step arrays
+// when this method is called.
+- (void)runInState:(ApplicationState*)state;
+@end
+
+#endif // IOS_CHROME_APP_APPLICATION_STEP_H_
« no previous file with comments | « ios/chrome/app/application_state.mm ('k') | ios/chrome/app/chrome_app_startup_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698