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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller_container_view.mm

Issue 1171203004: Correct iOS build for latest Xcode beta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/web_state/ui/crw_web_controller_container_view.h" 5 #import "ios/web/web_state/ui/crw_web_controller_container_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 9
10 #pragma mark - CRWToolbarContainerView 10 #pragma mark - CRWToolbarContainerView
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Container view that displays any added toolbars. It is always the top-most 91 // Container view that displays any added toolbars. It is always the top-most
92 // subview, and is bottom aligned with the CRWWebControllerContainerView. 92 // subview, and is bottom aligned with the CRWWebControllerContainerView.
93 @property(nonatomic, retain, readonly) 93 @property(nonatomic, retain, readonly)
94 CRWToolbarContainerView* toolbarContainerView; 94 CRWToolbarContainerView* toolbarContainerView;
95 95
96 @end 96 @end
97 97
98 @implementation CRWWebControllerContainerView 98 @implementation CRWWebControllerContainerView
99 99
100 - (instancetype)init {
101 NOTREACHED();
102 return nil;
103 }
104
105 - (instancetype)initWithFrame:(CGRect)frame { 100 - (instancetype)initWithFrame:(CGRect)frame {
106 self = [super initWithFrame:frame]; 101 self = [super initWithFrame:frame];
107 if (self) { 102 if (self) {
108 self.backgroundColor = [UIColor whiteColor]; 103 self.backgroundColor = [UIColor whiteColor];
109 self.autoresizingMask = 104 self.autoresizingMask =
110 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 105 UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
111 } 106 }
112 return self; 107 return self;
113 } 108 }
114 109
110 - (instancetype)init {
111 NOTREACHED();
112 return nil;
113 }
114
115 #pragma mark Accessors 115 #pragma mark Accessors
116 116
117 - (void)setToolbarContainerView:(CRWToolbarContainerView*)toolbarContainerView { 117 - (void)setToolbarContainerView:(CRWToolbarContainerView*)toolbarContainerView {
118 if (![_toolbarContainerView isEqual:toolbarContainerView]) { 118 if (![_toolbarContainerView isEqual:toolbarContainerView]) {
119 [_toolbarContainerView removeFromSuperview]; 119 [_toolbarContainerView removeFromSuperview];
120 _toolbarContainerView.reset([toolbarContainerView retain]); 120 _toolbarContainerView.reset([toolbarContainerView retain]);
121 [self addSubview:_toolbarContainerView]; 121 [self addSubview:_toolbarContainerView];
122 } 122 }
123 } 123 }
124 124
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 else 170 else
171 self.toolbarContainerView = nil; 171 self.toolbarContainerView = nil;
172 } 172 }
173 173
174 - (void)removeAllToolbars { 174 - (void)removeAllToolbars {
175 // Resetting the property will remove the toolbars from the hierarchy. 175 // Resetting the property will remove the toolbars from the hierarchy.
176 self.toolbarContainerView = nil; 176 self.toolbarContainerView = nil;
177 } 177 }
178 178
179 @end 179 @end
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_ui_simple_web_view_controller.mm ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698