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

Side by Side Diff: ios/public/provider/chrome/browser/voice/logo_animation_controller.h

Issue 2448823002: [ios] Adds the LogoAnimationController protocol. (Closed)
Patch Set: Drop Default. Created 4 years, 1 month 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/public/provider/chrome/browser/BUILD.gn ('k') | no next file » | 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 2016 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_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_LOGO_ANIMATION_CONTROLLER_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_LOGO_ANIMATION_CONTROLLER_H_
7
8 #include <Foundation/Foundation.h>
9
10 @protocol LogoAnimationControllerOwner;
11 @protocol LogoAnimationControllerOwnerOwner;
12
13 typedef NS_ENUM(NSUInteger, LogoAnimationControllerLogoState) {
14 // A state in which the logo is displayed.
15 LogoAnimationControllerLogoStateLogo,
16 // A state in which the microphone icon is displayed.
17 LogoAnimationControllerLogoStateMic,
18 };
19
20 #pragma mark LogoAnimationController
21
22 // Protocol for objects that act as logo animation controllers.
23 @protocol LogoAnimationController<NSObject>
24 @end
25
26 #pragma mark LogoAnimationControllerOwner
27
28 // Protocol used to transfer ownership of LogoAnimationControllers between
29 // objects.
30 @protocol LogoAnimationControllerOwner
31
32 // The controller to be used during the animation. Setting this property to a
33 // new controller transfers ownership to the receiver, and resetting it to nil
34 // relinquishes the receiver's ownership of the object. When this property is
35 // set, the owner must add the new controller's view to its view hierarchy and
36 // remove the old controller's view.
37 @property(nonatomic, strong) id<LogoAnimationController>
38 logoAnimationController;
39
40 // The default state used when the LogoAnimationController owned by the
41 // receiver is not showing dots or animating.
42 @property(nonatomic, readonly)
43 LogoAnimationControllerLogoState defaultLogoState;
44 @end
45
46 #pragma mark LogoAnimationControllerOwnerOwner
47
48 // Protocol for objects that potentially own LogoAnimationControllerOwners and
49 // sometimes (but not always) use them to display UI. This extra layer of
50 // indirection is necessary to decide whether to reparent animation views during
51 // transition animations, as simply checking whether a
52 // LogoAnimationControllerOwner's logoAnimationController is nil is
53 // insufficient. This is because a LogoAnimationController may have been
54 // reparented, but its LogoAnimationControllerOwner should still be used as the
55 // endpoint in the animation if it is in a state where it can be displayed.
56 @protocol LogoAnimationControllerOwnerOwner
57
58 // The LogoAnimationControllerOwner held by the conforming object.
59 @property(nonatomic, readonly) id<LogoAnimationControllerOwner>
60 logoAnimationControllerOwner;
61
62 @end
63
64 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_VOICE_LOGO_ANIMATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/public/provider/chrome/browser/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698