Chromium Code Reviews| 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" |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 // unhandled keyboard events and subclassing NSWindow is the only method to do | 28 // unhandled keyboard events and subclassing NSWindow is the only method to do |
| 29 // this. We also handle our own window controls and custom window frame drawing. | 29 // this. We also handle our own window controls and custom window frame drawing. |
| 30 @interface FramedBrowserWindow : ChromeBrowserWindow { | 30 @interface FramedBrowserWindow : ChromeBrowserWindow { |
| 31 @private | 31 @private |
| 32 BOOL shouldHideTitle_; | 32 BOOL shouldHideTitle_; |
| 33 BOOL hasTabStrip_; | 33 BOOL hasTabStrip_; |
| 34 NSButton* closeButton_; | 34 NSButton* closeButton_; |
| 35 NSButton* miniaturizeButton_; | 35 NSButton* miniaturizeButton_; |
| 36 NSButton* zoomButton_; | 36 NSButton* zoomButton_; |
| 37 | 37 |
| 38 // This is a lock which prevents the the frame and style | |
| 39 // of the window to be changed when it's set to YES | |
|
erikchen
2015/08/10 18:06:25
Grammar.
This lock prevents the frame and style o
spqchan1
2015/08/12 19:34:41
Done.
| |
| 40 BOOL frameAndStyleLock_; | |
| 41 | |
| 38 CGFloat windowButtonsInterButtonSpacing_; | 42 CGFloat windowButtonsInterButtonSpacing_; |
| 39 } | 43 } |
| 40 | 44 |
| 41 // Designated initializer. | 45 // Designated initializer. |
| 42 - (id)initWithContentRect:(NSRect)contentRect | 46 - (id)initWithContentRect:(NSRect)contentRect |
| 43 hasTabStrip:(BOOL)hasTabStrip; | 47 hasTabStrip:(BOOL)hasTabStrip; |
| 44 | 48 |
| 45 // Tells the window to suppress title drawing. | 49 // Tells the window to suppress title drawing. |
| 46 - (void)setShouldHideTitle:(BOOL)flag; | 50 - (void)setShouldHideTitle:(BOOL)flag; |
| 47 | 51 |
| 52 - (void) setFrameAndStyleLock:(BOOL)lock; | |
|
erikchen
2015/08/10 18:06:25
extra whitespace after (void)
spqchan1
2015/08/11 21:43:48
Done.
| |
| 53 | |
| 48 // Returns the desired spacing between window control views. | 54 // Returns the desired spacing between window control views. |
| 49 - (CGFloat)windowButtonsInterButtonSpacing; | 55 - (CGFloat)windowButtonsInterButtonSpacing; |
| 50 | 56 |
| 51 // Calls the superclass's implementation of |-toggleFullScreen:|. | 57 // Calls the superclass's implementation of |-toggleFullScreen:|. |
| 52 - (void)toggleSystemFullScreen; | 58 - (void)toggleSystemFullScreen; |
| 53 | 59 |
| 54 // Called by CustomFrameView to determine a custom location for the Lion | 60 // Called by CustomFrameView to determine a custom location for the Lion |
| 55 // fullscreen button. Returns NSZeroPoint to use the Lion default. | 61 // fullscreen button. Returns NSZeroPoint to use the Lion default. |
| 56 - (NSPoint)fullScreenButtonOriginAdjustment; | 62 - (NSPoint)fullScreenButtonOriginAdjustment; |
| 57 | 63 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 72 | 78 |
| 73 // Undocumented Cocoa API to suppress drawing of the window's title. | 79 // Undocumented Cocoa API to suppress drawing of the window's title. |
| 74 // -setTitle: still works, but the title set only applies to the | 80 // -setTitle: still works, but the title set only applies to the |
| 75 // miniwindow and menus (and, importantly, Expose). Overridden to | 81 // miniwindow and menus (and, importantly, Expose). Overridden to |
| 76 // return |shouldHideTitle_|. | 82 // return |shouldHideTitle_|. |
| 77 -(BOOL)_isTitleHidden; | 83 -(BOOL)_isTitleHidden; |
| 78 | 84 |
| 79 @end | 85 @end |
| 80 | 86 |
| 81 #endif // CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ | 87 #endif // CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ |
| OLD | NEW |