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

Side by Side Diff: chrome/browser/ui/cocoa/dev_tools_controller.mm

Issue 14935015: DevTools: devtools flickers when toggling between tab w/ tools and tab w/o tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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 [self updateDevToolsViewFrame];
167 166
168 BOOL isVertical = devToolsWindow_->dock_side() == DEVTOOLS_DOCK_SIDE_RIGHT; 167 BOOL isVertical = devToolsWindow_->dock_side() == DEVTOOLS_DOCK_SIDE_RIGHT;
169 [splitView_ setVertical:isVertical]; 168 [splitView_ setVertical:isVertical];
170 [self updateDevToolsSplitPosition]; 169 [self updateDevToolsSplitPosition];
170 [self updateDevToolsViewFrame];
171 } 171 }
172 172
173 - (void)hideDevToolsContainer { 173 - (void)hideDevToolsContainer {
174 NSArray* subviews = [splitView_ subviews]; 174 NSArray* subviews = [splitView_ subviews];
175 DCHECK_EQ([subviews count], 2u); 175 DCHECK_EQ([subviews count], 2u);
176 NSView* oldDevToolsContentsView = [subviews objectAtIndex:1]; 176 NSView* oldDevToolsContentsView = [subviews objectAtIndex:1];
177 [oldDevToolsContentsView removeFromSuperview]; 177 [oldDevToolsContentsView removeFromSuperview];
178 [splitView_ adjustSubviews]; 178 [splitView_ adjustSubviews];
179 } 179 }
180 180
(...skipping 86 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698