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

Side by Side Diff: chrome/browser/ui/cocoa/dev_tools_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, 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/dev_tools_controller.h" 5 #import "chrome/browser/ui/cocoa/dev_tools_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include <Cocoa/Cocoa.h> 9 #include <Cocoa/Cocoa.h>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 WebContents* devToolsContents = devToolsWindow_->web_contents(); 152 WebContents* devToolsContents = devToolsWindow_->web_contents();
153 153
154 // |devToolsView| is a TabContentsViewCocoa object, whose ViewID was 154 // |devToolsView| is a TabContentsViewCocoa object, whose ViewID was
155 // set to VIEW_ID_TAB_CONTAINER initially, so we need to change it to 155 // set to VIEW_ID_TAB_CONTAINER initially, so we need to change it to
156 // VIEW_ID_DEV_TOOLS_DOCKED here. 156 // VIEW_ID_DEV_TOOLS_DOCKED here.
157 NSView* devToolsView = devToolsContents->GetView()->GetNativeView(); 157 NSView* devToolsView = devToolsContents->GetView()->GetNativeView();
158 view_id_util::SetID(devToolsView, VIEW_ID_DEV_TOOLS_DOCKED); 158 view_id_util::SetID(devToolsView, VIEW_ID_DEV_TOOLS_DOCKED);
159 [devToolsView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; 159 [devToolsView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
160 160
161 NSRect containerRect = NSMakeRect(0, 0, 100, 100); 161 NSRect containerRect = NSMakeRect(0, 0, 100, 100);
162 scoped_nsobject<NSView> devToolsContainerView( 162 base::scoped_nsobject<NSView> devToolsContainerView(
163 [[NSView alloc] initWithFrame:containerRect]); 163 [[NSView alloc] initWithFrame:containerRect]);
164 [devToolsContainerView addSubview:devToolsView]; 164 [devToolsContainerView addSubview:devToolsView];
165 [splitView_ addSubview:devToolsContainerView]; 165 [splitView_ addSubview:devToolsContainerView];
166 166
167 BOOL isVertical = devToolsWindow_->dock_side() == DEVTOOLS_DOCK_SIDE_RIGHT; 167 BOOL isVertical = devToolsWindow_->dock_side() == DEVTOOLS_DOCK_SIDE_RIGHT;
168 [splitView_ setVertical:isVertical]; 168 [splitView_ setVertical:isVertical];
169 [self updateDevToolsSplitPosition]; 169 [self updateDevToolsSplitPosition];
170 [self updateDevToolsViewFrame]; 170 [self updateDevToolsViewFrame];
171 } 171 }
172 172
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] - 267 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] -
268 devToolsWindow_->GetMinimumHeight(); 268 devToolsWindow_->GetMinimumHeight();
269 } 269 }
270 } 270 }
271 271
272 -(void)splitViewWillResizeSubviews:(NSNotification *)notification { 272 -(void)splitViewWillResizeSubviews:(NSNotification *)notification {
273 [[splitView_ window] disableScreenUpdatesUntilFlush]; 273 [[splitView_ window] disableScreenUpdatesUntilFlush];
274 } 274 }
275 275
276 @end 276 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698