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

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

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 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 | Annotate | Revision Log
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 "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "chrome/browser/ui/cocoa/browser_window_controller.h" 8 #include "chrome/browser/ui/cocoa/browser_window_controller.h"
9 #include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h" 9 #include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h"
10 #include "chrome/browser/ui/cocoa/tab_contents/overlay_separator_view.h" 10 #include "chrome/browser/ui/cocoa/tab_contents/overlay_separator_view.h"
(...skipping 10 matching lines...) Expand all
21 @implementation OverlayableContentsController 21 @implementation OverlayableContentsController
22 22
23 @synthesize drawDropShadow = drawDropShadow_; 23 @synthesize drawDropShadow = drawDropShadow_;
24 @synthesize activeContainerOffset = activeContainerOffset_; 24 @synthesize activeContainerOffset = activeContainerOffset_;
25 @synthesize overlayContentsOffset = overlayContentsOffset_; 25 @synthesize overlayContentsOffset = overlayContentsOffset_;
26 26
27 - (id)initWithBrowser:(Browser*)browser 27 - (id)initWithBrowser:(Browser*)browser
28 windowController:(BrowserWindowController*)windowController { 28 windowController:(BrowserWindowController*)windowController {
29 if ((self = [super init])) { 29 if ((self = [super init])) {
30 windowController_ = windowController; 30 windowController_ = windowController;
31 scoped_nsobject<NSView> view([[NSView alloc] initWithFrame:NSZeroRect]); 31 base::scoped_nsobject<NSView> view(
32 [[NSView alloc] initWithFrame:NSZeroRect]);
32 [view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable]; 33 [view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
33 [view setAutoresizesSubviews:NO]; 34 [view setAutoresizesSubviews:NO];
34 [[NSNotificationCenter defaultCenter] 35 [[NSNotificationCenter defaultCenter]
35 addObserver:self 36 addObserver:self
36 selector:@selector(viewDidResize:) 37 selector:@selector(viewDidResize:)
37 name:NSViewFrameDidChangeNotification 38 name:NSViewFrameDidChangeNotification
38 object:view]; 39 object:view];
39 [self setView:view]; 40 [self setView:view];
40 41
41 activeContainer_.reset([[NSView alloc] initWithFrame:NSZeroRect]); 42 activeContainer_.reset([[NSView alloc] initWithFrame:NSZeroRect]);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 230
230 if (![windowController_ hasToolbar]) 231 if (![windowController_ hasToolbar])
231 return NO; 232 return NO;
232 233
233 // Show a separator is the overlay or the tab contents will be shown right 234 // Show a separator is the overlay or the tab contents will be shown right
234 // next to the omnibox. 235 // next to the omnibox.
235 return activeContainerOffset_ == 0 || overlayContents_; 236 return activeContainerOffset_ == 0 || overlayContents_;
236 } 237 }
237 238
238 @end 239 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698