OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "chrome/browser/ui/cocoa/chrome_browser_window.h" | 10 #include "chrome/browser/ui/cocoa/chrome_browser_window.h" |
11 | 11 |
12 // Offsets from the top/left of the window frame to the top of the window | 12 // Offsets from the top/left of the window frame to the top of the window |
13 // controls (zoom, close, miniaturize) for a window with a tabstrip. | 13 // controls (zoom, close, miniaturize) for a window with a tabstrip. |
14 const NSInteger kFramedWindowButtonsWithTabStripOffsetFromTop = 11; | 14 const NSInteger kFramedWindowButtonsWithTabStripOffsetFromTop = 11; |
15 const NSInteger kFramedWindowButtonsWithTabStripOffsetFromLeft = 11; | 15 const NSInteger kFramedWindowButtonsWithTabStripOffsetFromLeft = 11; |
16 | 16 |
17 // Offsets from the top/left of the window frame to the top of the window | 17 // Offsets from the top/left of the window frame to the top of the window |
18 // controls (zoom, close, miniaturize) for a window without a tabstrip. | 18 // controls (zoom, close, miniaturize) for a window without a tabstrip. |
19 const NSInteger kFramedWindowButtonsWithoutTabStripOffsetFromTop = 4; | 19 const NSInteger kFramedWindowButtonsWithoutTabStripOffsetFromTop = 4; |
20 const NSInteger kFramedWindowButtonsWithoutTabStripOffsetFromLeft = 8; | 20 const NSInteger kFramedWindowButtonsWithoutTabStripOffsetFromLeft = 8; |
21 | 21 |
| 22 const CGFloat kBrowserFrameViewPaintHeight = 60.0; |
| 23 |
22 // Cocoa class representing a framed browser window. | 24 // Cocoa class representing a framed browser window. |
23 // We need to override NSWindow with our own class since we need access to all | 25 // We need to override NSWindow with our own class since we need access to all |
24 // unhandled keyboard events and subclassing NSWindow is the only method to do | 26 // unhandled keyboard events and subclassing NSWindow is the only method to do |
25 // this. We also handle our own window controls and custom window frame drawing. | 27 // this. We also handle our own window controls and custom window frame drawing. |
26 @interface FramedBrowserWindow : ChromeBrowserWindow { | 28 @interface FramedBrowserWindow : ChromeBrowserWindow { |
27 @private | 29 @private |
28 BOOL shouldHideTitle_; | 30 BOOL shouldHideTitle_; |
29 BOOL hasTabStrip_; | 31 BOOL hasTabStrip_; |
30 NSButton* closeButton_; | 32 NSButton* closeButton_; |
31 NSButton* miniaturizeButton_; | 33 NSButton* miniaturizeButton_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 70 |
69 // Undocumented Cocoa API to suppress drawing of the window's title. | 71 // Undocumented Cocoa API to suppress drawing of the window's title. |
70 // -setTitle: still works, but the title set only applies to the | 72 // -setTitle: still works, but the title set only applies to the |
71 // miniwindow and menus (and, importantly, Expose). Overridden to | 73 // miniwindow and menus (and, importantly, Expose). Overridden to |
72 // return |shouldHideTitle_|. | 74 // return |shouldHideTitle_|. |
73 -(BOOL)_isTitleHidden; | 75 -(BOOL)_isTitleHidden; |
74 | 76 |
75 @end | 77 @end |
76 | 78 |
77 #endif // CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ | 79 #endif // CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ |
OLD | NEW |