Implements the new tab tip in-product help promotion. This presents a bubble pointing at the tab switcher with text informing users that they can open new tabs.
For modularization of future in-product help promotions that use BubbleView, the logic to manage the bubble is isolated in the BubbleViewControllerPresenter class. This class manages a BubbleViewController, presenting and sizing the bubble, dismissing the bubble via timeout, dismissing the bubble via tap (differentiating taps inside and outside the bubble), and tracking whether the user is "engaged" with the bubble. All objects displaying a BubbleView need to handle these concerns so they are instead centralized in the presenter.
Tracking "engagement" is important because the bubble is presented to inform users about features, so it is necessary to track whether users actually use the features in question. Once the bubble is visible and for a short period afterwards, users are considered "engaged" and in the future metrics can be tracked to determine whether presenting the bubble influenced users' actions.
Bug: 738164 Change-Id: I0d7bb0d7e4ab63963e5d44915e7b5ef11217a9cb Reviewed-on: https://chromium-review.googlesource.com/602608 Commit-Queue: Cooper Knaak
33f9f40 [iOS] Implement New Tab Tip In-Product Help Promotion
ios/chrome/app/strings/ios_strings.grd | 3 +
ios/chrome/browser/ui/browser_view_controller.mm | 76 +++++++
ios/chrome/browser/ui/bubble/BUILD.gn | 4 +
.../ui/bubble/bubble_view_controller_presenter.h | 62 ++++++
.../ui/bubble/bubble_view_controller_presenter.mm | 232 +++++++++++++++++++++
.../bubble_view_controller_presenter_unittest.mm | 186 +++++++++++++++++
6 files changed, 563 insertions(+)