OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/tab_contents_controller.h" | 5 #import "chrome/browser/cocoa/tab_contents_controller.h" |
6 | 6 |
7 #include "base/mac_util.h" | 7 #include "base/mac_util.h" |
8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
11 #import "chrome/browser/cocoa/view_id_util.h" | 11 #import "chrome/browser/cocoa/view_id_util.h" |
12 #include "chrome/browser/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/browser/renderer_host/render_view_host.h" | 13 #include "chrome/browser/renderer_host/render_view_host.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 | 16 |
17 // Default offset of the contents splitter in pixels. | 17 // Default offset of the contents splitter in pixels. |
18 static const int kDefaultContentsSplitOffset = 400; | 18 static const int kDefaultContentsSplitOffset = 400; |
19 | 19 |
20 // Never make the web part of the tab contents smaller than this (needed if the | 20 // Never make the web part of the tab contents smaller than this (needed if the |
21 // window is only a few pixels high). | 21 // window is only a few pixels high). |
22 static const int kMinWebHeight = 50; | 22 static const int kMinWebHeight = 50; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 - (CGFloat)devToolsHeight { | 142 - (CGFloat)devToolsHeight { |
143 NSArray* subviews = [contentsContainer_ subviews]; | 143 NSArray* subviews = [contentsContainer_ subviews]; |
144 if ([subviews count] < 2) | 144 if ([subviews count] < 2) |
145 return 0; | 145 return 0; |
146 return NSHeight([[subviews objectAtIndex:1] frame]) + | 146 return NSHeight([[subviews objectAtIndex:1] frame]) + |
147 [contentsContainer_ dividerThickness]; | 147 [contentsContainer_ dividerThickness]; |
148 } | 148 } |
149 | 149 |
150 @end | 150 @end |
OLD | NEW |