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/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 |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/debugger/devtools_window.h" | 12 #include "chrome/browser/debugger/devtools_window.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
15 #include "chrome/browser/ui/browser.h" | |
16 #import "chrome/browser/ui/cocoa/view_id_util.h" | 15 #import "chrome/browser/ui/cocoa/view_id_util.h" |
17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
18 | 17 |
19 namespace { | 18 namespace { |
20 | 19 |
21 // Default offset of the contents splitter in pixels. | 20 // Default offset of the contents splitter in pixels. |
22 const int kDefaultContentsSplitOffset = 400; | 21 const int kDefaultContentsSplitOffset = 400; |
23 | 22 |
24 // Never make the web part of the tab contents smaller than this (needed if the | 23 // Never make the web part of the tab contents smaller than this (needed if the |
25 // window is only a few pixels high). | 24 // window is only a few pixels high). |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // Return NO for the devTools view to indicate that it should not be resized | 154 // Return NO for the devTools view to indicate that it should not be resized |
156 // automatically. It preserves the height set by the user and also keeps | 155 // automatically. It preserves the height set by the user and also keeps |
157 // view height the same while changing tabs when one of the tabs shows infobar | 156 // view height the same while changing tabs when one of the tabs shows infobar |
158 // and others are not. | 157 // and others are not. |
159 if ([[splitView_ subviews] indexOfObject:subview] == 1) | 158 if ([[splitView_ subviews] indexOfObject:subview] == 1) |
160 return NO; | 159 return NO; |
161 return YES; | 160 return YES; |
162 } | 161 } |
163 | 162 |
164 @end | 163 @end |
OLD | NEW |