Commit 116928aa authored by Chris Lu's avatar Chris Lu Committed by Commit Bot

[ios] Remove references to AppBarPresenting

Every file has been moved to AppBarViewControllerPresenting. Safe to delete AppBarPresenting now.

Bug: 874471
Change-Id: I5c1edc13f1b9a8288c99fcb7b6e13f4ef7e70066
Reviewed-on: https://chromium-review.googlesource.com/1251762Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595824}
parent c58c1b63
...@@ -7,7 +7,6 @@ source_set("material_components") { ...@@ -7,7 +7,6 @@ source_set("material_components") {
sources = [ sources = [
"activity_indicator.h", "activity_indicator.h",
"activity_indicator.mm", "activity_indicator.mm",
"app_bar_presenting.h",
"app_bar_view_controller_presenting.h", "app_bar_view_controller_presenting.h",
"chrome_app_bar_view_controller.h", "chrome_app_bar_view_controller.h",
"chrome_app_bar_view_controller.m", "chrome_app_bar_view_controller.m",
......
// Copyright 2016 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_MATERIAL_COMPONENTS_APP_BAR_PRESENTING_H_
#define IOS_CHROME_BROWSER_UI_MATERIAL_COMPONENTS_APP_BAR_PRESENTING_H_
#import <UIKit/UIKit.h>
@class MDCAppBar;
// An object conforming to this protocol is capable of creating and managing an
// MDCAppBar. Typically, UIViewController's can implement this protocol to vend
// the app bar they can optionally be presenting.
@protocol AppBarPresenting<NSObject>
// The installed app bar, if any.
@property(nonatomic, readonly, strong) MDCAppBar* appBar;
@end
#endif // IOS_CHROME_BROWSER_UI_MATERIAL_COMPONENTS_APP_BAR_PRESENTING_H_
...@@ -5,13 +5,9 @@ ...@@ -5,13 +5,9 @@
#ifndef IOS_CHROME_BROWSER_UI_MATERIAL_COMPONENTS_UTILS_H_ #ifndef IOS_CHROME_BROWSER_UI_MATERIAL_COMPONENTS_UTILS_H_
#define IOS_CHROME_BROWSER_UI_MATERIAL_COMPONENTS_UTILS_H_ #define IOS_CHROME_BROWSER_UI_MATERIAL_COMPONENTS_UTILS_H_
@class MDCAppBar;
@class MDCAppBarViewController; @class MDCAppBarViewController;
@class UIScrollView; @class UIScrollView;
// Styles the passed app bar for displaying in Settings, history, bookmarks,
// etc. It follows the card style for collection views.
void ConfigureAppBarWithCardStyle(MDCAppBar* appBar);
// Styles the passed app bar view controller for displaying in Settings, // Styles the passed app bar view controller for displaying in Settings,
// history, bookmarks, etc. It follows the card style for collection views. // history, bookmarks, etc. It follows the card style for collection views.
void ConfigureAppBarViewControllerWithCardStyle( void ConfigureAppBarViewControllerWithCardStyle(
......
...@@ -36,18 +36,6 @@ void CustomizeAppBarShadow( ...@@ -36,18 +36,6 @@ void CustomizeAppBarShadow(
intensityDidChangeBlock:intensityBlock]; intensityDidChangeBlock:intensityBlock];
} }
void ConfigureAppBarWithCardStyle(MDCAppBar* appBar) {
appBar.headerViewController.headerView.canOverExtend = NO;
appBar.headerViewController.headerView.shiftBehavior =
MDCFlexibleHeaderShiftBehaviorDisabled;
appBar.headerViewController.headerView.backgroundColor =
[[MDCPalette greyPalette] tint200];
appBar.navigationBar.tintColor = [[MDCPalette greyPalette] tint900];
appBar.navigationBar.titleAlignment = MDCNavigationBarTitleAlignmentLeading;
CustomizeAppBarShadow(appBar.headerViewController);
}
void ConfigureAppBarViewControllerWithCardStyle( void ConfigureAppBarViewControllerWithCardStyle(
MDCAppBarViewController* viewController) { MDCAppBarViewController* viewController) {
viewController.headerView.canOverExtend = NO; viewController.headerView.canOverExtend = NO;
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "ios/chrome/browser/sync/sync_setup_service_factory.h" #include "ios/chrome/browser/sync/sync_setup_service_factory.h"
#import "ios/chrome/browser/ui/icons/chrome_icon.h" #import "ios/chrome/browser/ui/icons/chrome_icon.h"
#import "ios/chrome/browser/ui/keyboard/UIKeyCommand+Chrome.h" #import "ios/chrome/browser/ui/keyboard/UIKeyCommand+Chrome.h"
#import "ios/chrome/browser/ui/material_components/app_bar_presenting.h"
#import "ios/chrome/browser/ui/material_components/app_bar_view_controller_presenting.h" #import "ios/chrome/browser/ui/material_components/app_bar_view_controller_presenting.h"
#import "ios/chrome/browser/ui/material_components/utils.h" #import "ios/chrome/browser/ui/material_components/utils.h"
#import "ios/chrome/browser/ui/settings/accounts_collection_view_controller.h" #import "ios/chrome/browser/ui/settings/accounts_collection_view_controller.h"
...@@ -557,8 +556,7 @@ initWithRootViewController:(UIViewController*)rootViewController ...@@ -557,8 +556,7 @@ initWithRootViewController:(UIViewController*)rootViewController
- (UIViewController*)wrappedControllerIfNeeded:(UIViewController*)controller { - (UIViewController*)wrappedControllerIfNeeded:(UIViewController*)controller {
// If the controller can't be presented with an app bar, it needs to be // If the controller can't be presented with an app bar, it needs to be
// wrapped in an MDCAppBarContainerViewController. // wrapped in an MDCAppBarContainerViewController.
if (![controller conformsToProtocol:@protocol(AppBarPresenting)] && if (![controller
![controller
conformsToProtocol:@protocol(AppBarViewControllerPresenting)]) { conformsToProtocol:@protocol(AppBarViewControllerPresenting)]) {
MDCAppBarContainerViewController* appBarContainer = MDCAppBarContainerViewController* appBarContainer =
[[SettingsAppBarContainerViewController alloc] [[SettingsAppBarContainerViewController alloc]
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "ios/chrome/browser/ui/material_components/app_bar_presenting.h"
#import "ios/chrome/browser/ui/settings/settings_root_table_view_controller.h" #import "ios/chrome/browser/ui/settings/settings_root_table_view_controller.h"
// TableCellCatalogViewController is a Debug-only settings screen which serves // TableCellCatalogViewController is a Debug-only settings screen which serves
......
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
return view; return view;
} }
#pragma mark - MDCAppBar support #pragma mark - MDCAppBarViewController support
- (UIViewController*)childViewControllerForStatusBarHidden { - (UIViewController*)childViewControllerForStatusBarHidden {
return self.appBarViewController; return self.appBarViewController;
......
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