[ios] Implement BubbleView and BubbleViewController

Desktop / Chromium - Helen Yang [google.com] - 9 August 2017 02:00 EDT

This CL implements BubbleView and BubbleViewController. It adds logic to BubbleView to properly layout subviews and calculate its optimal size. Additionally, it adds animation logic to BubbleViewController's display and dismissal methods.

This CL also adds unit tests for BubbleView, modifies the Showcase implementation to display the bubble, and changes the alignment offset value in bubble_util_unittest.mm to be consistent with the offset value defined in BubbleView.

Screenshots and video of the animation can be found in this folder: https://drive.google.com/drive/folders/0B3YZmy_OdK4sTERILW15Q2NHN00?usp=sharing

Bug: 740145 Change-Id: I175eefbf3b739d48931ef8d8e77130892c3fa27f Reviewed-on: https://chromium-review.googlesource.com/598591 Commit-Queue: Gregory Chatzinoff

0903eec [ios] Implement BubbleView and BubbleViewController
ios/chrome/browser/ui/bubble/BUILD.gn | 6 +-
.../browser/ui/bubble/bubble_util_unittest.mm | 2 +-
ios/chrome/browser/ui/bubble/bubble_view.h | 7 +-
ios/chrome/browser/ui/bubble/bubble_view.mm | 309 ++++++++++++++++++++-
.../browser/ui/bubble/bubble_view_controller.h | 6 +-
.../browser/ui/bubble/bubble_view_controller.mm | 57 +++-
.../ui/bubble/bubble_view_controller_unittest.mm | 30 --
.../browser/ui/bubble/bubble_view_unittest.mm | 73 +++++
ios/showcase/bubble/sc_bubble_coordinator.mm | 2 +-
9 files changed, 439 insertions(+), 53 deletions(-)

Upstream: git.chromium.org


  • Share