Commit c21e0c27 authored by Chris Lu's avatar Chris Lu Committed by Commit Bot

[ios] Remove BadgeCoordinator

Bug: 981925, 976901
Change-Id: Ie4be37f33212753b6b44b5cfb370c646597ea5e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702285Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678290}
parent 16acf211
...@@ -14,8 +14,6 @@ source_set("badges") { ...@@ -14,8 +14,6 @@ source_set("badges") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
sources = [ sources = [
"badge_consumer.h", "badge_consumer.h",
"badge_coordinator.h",
"badge_coordinator.mm",
"badge_mediator.h", "badge_mediator.h",
"badge_mediator.mm", "badge_mediator.mm",
] ]
......
// Copyright 2019 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_BADGES_BADGE_COORDINATOR_H_
#define IOS_CHROME_BROWSER_UI_BADGES_BADGE_COORDINATOR_H_
#import "ios/chrome/browser/ui/coordinators/chrome_coordinator.h"
@protocol BadgeConsumer;
class WebStateList;
// Coordinator that presents badges.
@interface BadgeCoordinator : ChromeCoordinator
// The ViewController that the Coordinator is managing.
// TODO(crbug.com/981925): Replace this property with a getter once
// BadgeCoordinator manages its own view controller.
@property(nonatomic, weak) UIViewController<BadgeConsumer>* viewController;
// The WebStateList for this Coordinator.
@property(nonatomic, assign) WebStateList* webStateList;
@end
#endif // IOS_CHROME_BROWSER_UI_BADGES_BADGE_COORDINATOR_H_
// Copyright 2019 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.
#import "ios/chrome/browser/ui/badges/badge_coordinator.h"
#import "ios/chrome/browser/ui/badges/badge_mediator.h"
#import "ios/chrome/browser/ui/infobars/infobar_feature.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@interface BadgeCoordinator ()
// The coordinator's mediator.
@property(nonatomic, strong) BadgeMediator* mediator;
@end
@implementation BadgeCoordinator
- (void)start {
if (IsInfobarUIRebootEnabled()) {
self.mediator = [[BadgeMediator alloc] initWithConsumer:self.viewController
webStateList:self.webStateList];
}
}
- (void)stop {
[self.mediator disconnect];
self.mediator = nil;
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment