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

Unified Diff: ios/chrome/app/main_controller_private.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/main_controller.mm ('k') | ios/chrome/app/main_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/main_controller_private.h
diff --git a/ios/chrome/app/main_controller_private.h b/ios/chrome/app/main_controller_private.h
new file mode 100644
index 0000000000000000000000000000000000000000..a97856cee0a7927c17a876f3c1a40d55cabc1936
--- /dev/null
+++ b/ios/chrome/app/main_controller_private.h
@@ -0,0 +1,80 @@
+// Copyright 2015 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 IOS_CHROME_APP_MAIN_CONTROLLER_PRIVATE_H_
+#define IOS_CHROME_APP_MAIN_CONTROLLER_PRIVATE_H_
+
+#import "base/ios/block_types.h"
+#include "components/browsing_data/core/browsing_data_utils.h"
+#import "ios/chrome/app/application_delegate/browser_launcher.h"
+#import "ios/chrome/app/main_controller.h"
+
+@class BrowserViewController;
+@class DeviceSharingManager;
+class GURL;
+@class SettingsNavigationController;
+@class SigninInteractionController;
+@class TabModel;
+@protocol TabSwitcher;
+
+namespace ios {
+class ChromeBrowserState;
+}
+
+// Private methods and protocols that are made visible here for tests.
+@interface MainController ()
+
+// YES if the last time the app was launched was with a previous version.
+@property(nonatomic, readonly) BOOL isFirstLaunchAfterUpgrade;
+
+// Presents a promo's navigation controller.
+- (void)showPromo:(UIViewController*)promo;
+
+// Removes browsing data from |browserState| for datatypes in |mask|.
+// |browserState| cannot be null and must not be off the record.
+// |completionHandler| is called when this operation finishes.
+- (void)removeBrowsingDataFromBrowserState:
+ (ios::ChromeBrowserState*)browserState
+ mask:(int)mask
+ timePeriod:(browsing_data::TimePeriod)timePeriod
+ completionHandler:(ProceduralBlock)completionHandler;
+
+// Dismisses all modal dialogs then call |completion|.
+- (void)dismissModalDialogsWithCompletion:(ProceduralBlock)completion;
+
+@end
+
+// Methods that only exist for tests.
+@interface MainController (TestingOnly)
+
+@property(nonatomic, readonly) DeviceSharingManager* deviceSharingManager;
+@property(nonatomic, retain)
+ UIViewController<TabSwitcher>* tabSwitcherController;
+@property(nonatomic, readonly)
+ SettingsNavigationController* settingsNavigationController;
+@property(nonatomic, readonly)
+ SigninInteractionController* signinInteractionController;
+
+// The top presented view controller that is not currently being dismissed.
+@property(nonatomic, readonly) UIViewController* topPresentedViewController;
+
+// Tab switcher state.
+@property(nonatomic, getter=isTabSwitcherActive) BOOL tabSwitcherActive;
+@property(nonatomic, readonly) BOOL dismissingTabSwitcher;
+
+// Sets up MainController for testing; clears history, closes all tabs and
+// switches to the main BVC. |completionHandler| is called when MainController
+// is completely set up for testing.
+- (void)setUpForTestingWithCompletionHandler:(ProceduralBlock)completionHandler;
+
+// Sets the internal startup state to indicate that the launch was triggered
+// by an external app opening the given URL.
+- (void)setStartupParametersWithURL:(const GURL&)launchURL;
+
+// Sets the internal state to indicate that the app has been foregrounded.
+- (void)setUpAsForegrounded;
+
+@end
+
+#endif // IOS_CHROME_APP_MAIN_CONTROLLER_PRIVATE_H_
« no previous file with comments | « ios/chrome/app/main_controller.mm ('k') | ios/chrome/app/main_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698