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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/infobar_container_controller.mm

Issue 240193003: Move Infobars core files to the Infobars component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nib name on mac Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" 5 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "chrome/browser/infobars/confirm_infobar_delegate.h" 9 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
10 #include "chrome/browser/infobars/infobar.h"
11 #include "chrome/browser/infobars/infobar_container.h"
12 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
13 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 11 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
14 #import "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h" 12 #import "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h"
15 #import "chrome/browser/ui/cocoa/infobars/infobar_container_cocoa.h" 13 #import "chrome/browser/ui/cocoa/infobars/infobar_container_cocoa.h"
16 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" 14 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h"
17 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 15 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
18 #import "chrome/browser/ui/cocoa/view_id_util.h" 16 #import "chrome/browser/ui/cocoa/view_id_util.h"
17 #include "components/infobars/core/infobar.h"
18 #include "components/infobars/core/infobar_container.h"
19 19
20 @interface InfoBarContainerController () 20 @interface InfoBarContainerController ()
21 // Removes |controller| from the list of controllers in this container and 21 // Removes |controller| from the list of controllers in this container and
22 // removes its view from the view hierarchy. This method is safe to call while 22 // removes its view from the view hierarchy. This method is safe to call while
23 // |controller| is still on the call stack. 23 // |controller| is still on the call stack.
24 - (void)removeController:(InfoBarController*)controller; 24 - (void)removeController:(InfoBarController*)controller;
25 @end 25 @end
26 26
27 27
28 @implementation InfoBarContainerController 28 @implementation InfoBarContainerController
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 // This code can be executed while InfoBarController is still on the stack, so 155 // This code can be executed while InfoBarController is still on the stack, so
156 // we retain and autorelease the controller to prevent it from being 156 // we retain and autorelease the controller to prevent it from being
157 // dealloc'ed too early. 157 // dealloc'ed too early.
158 [[controller retain] autorelease]; 158 [[controller retain] autorelease];
159 [[controller view] removeFromSuperview]; 159 [[controller view] removeFromSuperview];
160 [infobarControllers_ removeObject:controller]; 160 [infobarControllers_ removeObject:controller];
161 } 161 }
162 162
163 @end 163 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698