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

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

Issue 12674019: Alternate NTP Mac: Show overlay at fixed position (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 [self hideDevToolsContainer]; 122 [self hideDevToolsContainer];
123 123
124 devToolsWindow_ = newDevToolsWindow; 124 devToolsWindow_ = newDevToolsWindow;
125 125
126 if (devToolsWindow_) { 126 if (devToolsWindow_) {
127 dockSide_ = devToolsWindow_->dock_side(); 127 dockSide_ = devToolsWindow_->dock_side();
128 [self showDevToolsContainer]; 128 [self showDevToolsContainer];
129 } 129 }
130 } 130 }
131 131
132 - (CGFloat)topContentOffset {
133 return [splitView_ topContentOffset];
134 }
135
132 - (void)setTopContentOffset:(CGFloat)offset { 136 - (void)setTopContentOffset:(CGFloat)offset {
133 [splitView_ setTopContentOffset:offset]; 137 [splitView_ setTopContentOffset:offset];
134 if ([[splitView_ subviews] count] > 1) 138 if ([[splitView_ subviews] count] > 1)
135 [self updateDevToolsViewFrame]; 139 [self updateDevToolsViewFrame];
136 } 140 }
137 141
138 - (void)showDevToolsContainer { 142 - (void)showDevToolsContainer {
139 NSArray* subviews = [splitView_ subviews]; 143 NSArray* subviews = [splitView_ subviews];
140 DCHECK_EQ([subviews count], 1u); 144 DCHECK_EQ([subviews count], 1u);
141 WebContents* devToolsContents = devToolsWindow_->web_contents(); 145 WebContents* devToolsContents = devToolsWindow_->web_contents();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] - 243 return NSHeight([splitView_ frame]) - [splitView_ dividerThickness] -
240 devToolsWindow_->GetMinimumHeight(); 244 devToolsWindow_->GetMinimumHeight();
241 } 245 }
242 } 246 }
243 247
244 -(void)splitViewWillResizeSubviews:(NSNotification *)notification { 248 -(void)splitViewWillResizeSubviews:(NSNotification *)notification {
245 [[splitView_ window] disableScreenUpdatesUntilFlush]; 249 [[splitView_ window] disableScreenUpdatesUntilFlush];
246 } 250 }
247 251
248 @end 252 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/dev_tools_controller.h ('k') | chrome/browser/ui/cocoa/dev_tools_controller_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698