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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm

Issue 1221173003: [Mac] Inform reference counted objects that hold a weak Browser* when the Browser is being destroye… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove dealloc override. Created 5 years, 5 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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/tab_contents/overlayable_contents_controller.h" 5 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
6 6
7 #include "content/public/browser/web_contents.h"
8
9 @implementation OverlayableContentsController 7 @implementation OverlayableContentsController
10 8
11 - (id)initWithBrowser:(Browser*)browser { 9 - (id)init {
12 if ((self = [super init])) { 10 if ((self = [super init])) {
13 base::scoped_nsobject<NSView> view( 11 base::scoped_nsobject<NSView> view(
14 [[NSView alloc] initWithFrame:NSZeroRect]); 12 [[NSView alloc] initWithFrame:NSZeroRect]);
15 [view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable]; 13 [view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
16 [self setView:view]; 14 [self setView:view];
17 15
18 activeContainer_.reset([[NSView alloc] initWithFrame:NSZeroRect]); 16 activeContainer_.reset([[NSView alloc] initWithFrame:NSZeroRect]);
19 [activeContainer_ setAutoresizingMask:NSViewHeightSizable | 17 [activeContainer_ setAutoresizingMask:NSViewHeightSizable |
20 NSViewWidthSizable]; 18 NSViewWidthSizable];
21 [view addSubview:activeContainer_]; 19 [view addSubview:activeContainer_];
22 } 20 }
23 return self; 21 return self;
24 } 22 }
25 23
26 - (NSView*)activeContainer { 24 - (NSView*)activeContainer {
27 return activeContainer_.get(); 25 return activeContainer_.get();
28 } 26 }
29 27
30 @end 28 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698