Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Side by Side Diff: chrome/browser/ui/cocoa/framed_browser_window.h

Issue 1276383004: Implemented fullscreen exit animation with AppKit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed extra include Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Locks the window's frame and style mask. If it's set to YES, then the
39 // frame and the style mask cannot be changed.
40 BOOL frameAndStyleMaskLock_;
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 // When the lock is set to YES, the frame and style mask of the Window cannot be
53 // changed. This is used to prevent AppKit from making these unwanted changes
54 // to the window during exit fullscreen transition. It is very important to
55 // release this lock after the transition is completed.
56 - (void)setFrameAndStyleMaskLock:(BOOL)lock;
57
58 // This method is overridden to prevent AppKit from setting the style mask
59 // when frameAndStyleMaskLock_ is set to true.
60 - (void)setStyleMask:(NSUInteger)styleMask;
61
62 // This method is overridden to prevent the AppKit from setting the frame when
63 // frameAndStyleMaskLock_ is set to true.
64 - (void)setFrame:(NSRect)windowFrame
65 display:(BOOL)displayViews
66 animate:(BOOL)performAnimation;
67
48 // Returns the desired spacing between window control views. 68 // Returns the desired spacing between window control views.
49 - (CGFloat)windowButtonsInterButtonSpacing; 69 - (CGFloat)windowButtonsInterButtonSpacing;
50 70
51 // Calls the superclass's implementation of |-toggleFullScreen:|. 71 // Calls the superclass's implementation of |-toggleFullScreen:|.
52 - (void)toggleSystemFullScreen; 72 - (void)toggleSystemFullScreen;
53 73
54 // Called by CustomFrameView to determine a custom location for the Lion 74 // Called by CustomFrameView to determine a custom location for the Lion
55 // fullscreen button. Returns NSZeroPoint to use the Lion default. 75 // fullscreen button. Returns NSZeroPoint to use the Lion default.
56 - (NSPoint)fullScreenButtonOriginAdjustment; 76 - (NSPoint)fullScreenButtonOriginAdjustment;
57 77
(...skipping 14 matching lines...) Expand all
72 92
73 // Undocumented Cocoa API to suppress drawing of the window's title. 93 // Undocumented Cocoa API to suppress drawing of the window's title.
74 // -setTitle: still works, but the title set only applies to the 94 // -setTitle: still works, but the title set only applies to the
75 // miniwindow and menus (and, importantly, Expose). Overridden to 95 // miniwindow and menus (and, importantly, Expose). Overridden to
76 // return |shouldHideTitle_|. 96 // return |shouldHideTitle_|.
77 -(BOOL)_isTitleHidden; 97 -(BOOL)_isTitleHidden;
78 98
79 @end 99 @end
80 100
81 #endif // CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_ 101 #endif // CHROME_BROWSER_UI_COCOA_FRAMED_BROWSER_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_fullscreen_transition.mm ('k') | chrome/browser/ui/cocoa/framed_browser_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698