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

Unified Diff: ios/chrome/browser/ui/bubble_promo/bubble_view_controller.h

Issue 2964233002: [ios] BubbleViewController and BubbleView stubs. (Closed)
Patch Set: Created 3 years, 6 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
Index: ios/chrome/browser/ui/bubble_promo/bubble_view_controller.h
diff --git a/ios/chrome/browser/ui/bubble_promo/bubble_view_controller.h b/ios/chrome/browser/ui/bubble_promo/bubble_view_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..d6882493d8c263627d1db8b0b6488aaa70c08789
--- /dev/null
+++ b/ios/chrome/browser/ui/bubble_promo/bubble_view_controller.h
@@ -0,0 +1,42 @@
+// Copyright 2017 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_BROWSER_UI_BUBBLE_PROMO_BUBBLE_VIEW_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_UI_BUBBLE_PROMO_BUBBLE_VIEW_CONTROLLER_H_
+
+#import <UIKit/UIKit.h>
+
+@class BubbleConfiguration;
+
+enum class BubbleArrowDirection;
edchin 2017/07/01 15:29:28 Both of these should be defined in this header fil
helenlyang 2017/07/05 20:35:37 Done.
+enum class BubbleAlignment;
+
+// View controller that manages a speech bubble-shaped view, which displays a
+// message in white text and points to the UI element of interest.
edchin 2017/07/01 15:29:28 White text is irrelevant.
helenlyang 2017/07/05 20:35:37 Removed.
+@interface BubbleViewController : UIViewController
+
+// The preferred origin of |self.view|. Note that this does not set
edchin 2017/07/01 15:29:28 "Preferred origin" assumes that the BubbleVC knows
helenlyang 2017/07/05 20:35:37 Removed for now, but may change based on our discu
+// |self.view.frame.origin|; it is the responsibility of BubbleVC's containing
+// view controller to properly set the frame of |self.view|.
+@property(nonatomic, readonly) CGPoint bubbleOrigin;
+
+// Initializes the bubble with the configuration object, which gives information
+// such as text, arrow direction, alignment, and the UI element it points to.
+- (instancetype)initWithConfiguration:(BubbleConfiguration*)configuration
edchin 2017/07/01 15:29:28 I suggest that we initialize with the necessary in
helenlyang 2017/07/05 20:35:37 Done. I stuck with the "arrowDirection" parameter
edchin 2017/07/06 04:56:19 Acknowledged.
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)initWithNibName:(NSString*)nibNameOrNil
+ bundle:(NSBundle*)nibBundleOrNil NS_UNAVAILABLE;
+
+- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
edchin 2017/07/01 15:29:27 The important one to set as unavailable is -init;
helenlyang 2017/07/05 20:35:37 Done.
edchin 2017/07/06 04:56:19 As I was doing some other work, I discovered that
+
+// Animates the bubble in with a fade-in.
+- (void)animateContentIn;
+
+// Dismisses the bubble. If |animated| is true, the bubble fades out.
+- (void)dismissAnimated:(BOOL)animated;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_BUBBLE_PROMO_BUBBLE_VIEW_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698