| 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 #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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "base/scoped_nsobject.h" | 11 #include "base/scoped_nsobject.h" |
| 12 #include "chrome/browser/ui/cocoa/chrome_browser_window.h" | 12 #include "chrome/browser/ui/cocoa/chrome_browser_window.h" |
| 13 | 13 |
| 14 // Offset from the top of the window frame to the top of the window controls | 14 // Offsets from the top/left of the window frame to the top of the window |
| 15 // (zoom, close, miniaturize) for a window with a tabstrip. | 15 // controls (zoom, close, miniaturize) for a window with a tabstrip. |
| 16 const NSInteger kFramedWindowButtonsWithTabStripOffsetFromTop = 6; | 16 const NSInteger kFramedWindowButtonsWithTabStripOffsetFromTop = 10; |
| 17 const NSInteger kFramedWindowButtonsWithTabStripOffsetFromLeft = 10; |
| 17 | 18 |
| 18 // Offset from the top of the window frame to the top of the window controls | 19 // Offsets from the top/left of the window frame to the top of the window |
| 19 // (zoom, close, miniaturize) for a window without a tabstrip. | 20 // controls (zoom, close, miniaturize) for a window without a tabstrip. |
| 20 const NSInteger kFramedWindowButtonsWithoutTabStripOffsetFromTop = 4; | 21 const NSInteger kFramedWindowButtonsWithoutTabStripOffsetFromTop = 4; |
| 21 | 22 const NSInteger kFramedWindowButtonsWithoutTabStripOffsetFromLeft = 8; |
| 22 // Offset from the left of the window frame to the top of the window controls | |
| 23 // (zoom, close, miniaturize). | |
| 24 const NSInteger kFramedWindowButtonsOffsetFromLeft = 8; | |
| 25 | 23 |
| 26 // Offset between the window controls (zoom, close, miniaturize). | 24 // Offset between the window controls (zoom, close, miniaturize). |
| 27 const NSInteger kFramedWindowButtonsInterButtonSpacing = 7; | 25 const NSInteger kFramedWindowButtonsInterButtonSpacing = 7; |
| 28 | 26 |
| 29 // Cocoa class representing a framed browser window. | 27 // Cocoa class representing a framed browser window. |
| 30 // We need to override NSWindow with our own class since we need access to all | 28 // We need to override NSWindow with our own class since we need access to all |
| 31 // unhandled keyboard events and subclassing NSWindow is the only method to do | 29 // unhandled keyboard events and subclassing NSWindow is the only method to do |
| 32 // this. We also handle our own window controls and custom window frame drawing. | 30 // this. We also handle our own window controls and custom window frame drawing. |
| 33 @interface FramedBrowserWindow : ChromeBrowserWindow { | 31 @interface FramedBrowserWindow : ChromeBrowserWindow { |
| 34 @private | 32 @private |
| (...skipping 21 matching lines...) Expand all Loading... |
| 56 | 54 |
| 57 // Undocumented Cocoa API to suppress drawing of the window's title. | 55 // Undocumented Cocoa API to suppress drawing of the window's title. |
| 58 // -setTitle: still works, but the title set only applies to the | 56 // -setTitle: still works, but the title set only applies to the |
| 59 // miniwindow and menus (and, importantly, Expose). Overridden to | 57 // miniwindow and menus (and, importantly, Expose). Overridden to |
| 60 // return |shouldHideTitle_|. | 58 // return |shouldHideTitle_|. |
| 61 -(BOOL)_isTitleHidden; | 59 -(BOOL)_isTitleHidden; |
| 62 | 60 |
| 63 @end | 61 @end |
| 64 | 62 |
| 65 #endif // CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ | 63 #endif // CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ |
| OLD | NEW |