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

Side by Side Diff: ios/chrome/browser/upgrade/upgrade_center.h

Issue 2568003005: [ios] Adds code for Omaha and the upgrade center. (Closed)
Patch Set: Review. 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/upgrade/BUILD.gn ('k') | ios/chrome/browser/upgrade/upgrade_center.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UPGRADE_UPGRADE_CENTER_H_
6 #define IOS_CHROME_BROWSER_UPGRADE_UPGRADE_CENTER_H_
7
8 #import <UIKit/UIKit.h>
9
10 #include "ios/chrome/browser/upgrade/upgrade_recommended_details.h"
11
12 @class UpgradeCenter;
13
14 namespace infobars {
15 class InfoBarManager;
16 }
17
18 @protocol UpgradeCenterClientProtocol
19
20 // This is expected to call -addInfoBarToHelper:forTabId: for each tab to place
21 // the infobars in the UI. The client must not unregister itself while in this
22 // method.
23 - (void)showUpgrade:(UpgradeCenter*)center;
24
25 @end
26
27 @interface UpgradeCenter : NSObject
28
29 // Returns the singleton instance of the class.
30 + (UpgradeCenter*)sharedInstance;
31
32 // Registers a client for the UpgradeCenter. The clients are not retained,
33 // unregisterClient: must be called before the object goes away.
34 - (void)registerClient:(id<UpgradeCenterClientProtocol>)client;
35
36 // Unregisters a client.
37 - (void)unregisterClient:(id<UpgradeCenterClientProtocol>)client;
38
39 // Clients should call this method when -showUpgrade: is called or when a new
40 // tab is created. The infobar will not be created if it already exists or if
41 // there is no need to do so.
42 - (void)addInfoBarToManager:(infobars::InfoBarManager*)infoBarManager
43 forTabId:(NSString*)tabId;
44
45 // For the UpgradeCenter to make the distinction between an infobar closed by
46 // the user directly and an infobar dismissed because the Tab it is on is
47 // removed.
48 - (void)tabWillClose:(NSString*)tabId;
49
50 // Called when a notification is received from one of the upgrade mechanism.
51 - (void)upgradeNotificationDidOccur:(const UpgradeRecommendedDetails&)details;
52
53 @end
54
55 @interface UpgradeCenter (UsedForTests)
56 // Reset everything (forget clients, remove the infobar everywhere...)
57 - (void)resetForTests;
58 // Simulate the minimum display interval having elapsed.
59 - (void)setLastDisplayToPast;
60 @end
61
62 #endif // IOS_CHROME_BROWSER_UPGRADE_UPGRADE_CENTER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/upgrade/BUILD.gn ('k') | ios/chrome/browser/upgrade/upgrade_center.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698