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

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

Issue 523723002: mac, fullscreen: Several bug fixes after major refactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_fullscreen2
Patch Set: Created 6 years, 3 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_BROWSER_WINDOW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
7 7
8 // A class acting as the Objective-C controller for the Browser 8 // A class acting as the Objective-C controller for the Browser
9 // object. Handles interactions between Cocoa and the cross-platform 9 // object. Handles interactions between Cocoa and the cross-platform
10 // code. Each window has a single toolbar and, by virtue of being a 10 // code. Each window has a single toolbar and, by virtue of being a
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 @class TranslateBubbleController; 50 @class TranslateBubbleController;
51 51
52 namespace content { 52 namespace content {
53 class WebContents; 53 class WebContents;
54 } 54 }
55 55
56 namespace extensions { 56 namespace extensions {
57 class Command; 57 class Command;
58 } 58 }
59 59
60 namespace fullscreen_mac {
61 enum SlidingStyle {
62 OMNIBOX_TABS_PRESENT = 0, // Tab strip and omnibox both visible.
63 OMNIBOX_PRESENT, // Tab strip hidden.
64 OMNIBOX_TABS_HIDDEN, // Tab strip and omnibox both hidden.
65 };
66 } // namespace fullscreen_mac
67
68 @interface BrowserWindowController : 60 @interface BrowserWindowController :
69 TabWindowController<NSUserInterfaceValidations, 61 TabWindowController<NSUserInterfaceValidations,
70 BookmarkBarControllerDelegate, 62 BookmarkBarControllerDelegate,
71 BrowserCommandExecutor, 63 BrowserCommandExecutor,
72 ViewResizer, 64 ViewResizer,
73 TabStripControllerDelegate> { 65 TabStripControllerDelegate> {
74 @private 66 @private
75 // The ordering of these members is important as it determines the order in 67 // The ordering of these members is important as it determines the order in
76 // which they are destroyed. |browser_| needs to be destroyed last as most of 68 // which they are destroyed. |browser_| needs to be destroyed last as most of
77 // the other objects hold weak references to it or things it owns 69 // the other objects hold weak references to it or things it owns
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 base::scoped_nsobject<NSWindow> fullscreenWindow_; 127 base::scoped_nsobject<NSWindow> fullscreenWindow_;
136 128
137 // The Cocoa implementation of the PermissionBubbleView. 129 // The Cocoa implementation of the PermissionBubbleView.
138 scoped_ptr<PermissionBubbleCocoa> permissionBubbleCocoa_; 130 scoped_ptr<PermissionBubbleCocoa> permissionBubbleCocoa_;
139 131
140 // True between |-windowWillEnterFullScreen:| and |-windowDidEnterFullScreen:| 132 // True between |-windowWillEnterFullScreen:| and |-windowDidEnterFullScreen:|
141 // to indicate that the window is in the process of transitioning into 133 // to indicate that the window is in the process of transitioning into
142 // AppKit fullscreen mode. 134 // AppKit fullscreen mode.
143 BOOL enteringAppKitFullscreen_; 135 BOOL enteringAppKitFullscreen_;
144 136
137 // Only adjust the tab strip once while entering fullscreen. See the code
138 // where this is used for a more detailed explanation.
Robert Sesek 2014/09/02 19:59:48 Name the actual method so the reader does not have
erikchen 2014/09/02 20:43:21 Done.
139 BOOL hasAdjustedTabStripWhileEnteringAppKitFullscreen_;
140
145 // True between |enterImmersiveFullscreen| and |-windowDidEnterFullScreen:| 141 // True between |enterImmersiveFullscreen| and |-windowDidEnterFullScreen:|
146 // to indicate that the window is in the process of transitioning into 142 // to indicate that the window is in the process of transitioning into
147 // AppKit fullscreen mode. 143 // AppKit fullscreen mode.
148 BOOL enteringImmersiveFullscreen_; 144 BOOL enteringImmersiveFullscreen_;
149 145
150 // True between |-setPresentationMode:url:bubbleType:| and 146 // True between |-setPresentationMode:url:bubbleType:| and
151 // |-windowDidEnterFullScreen:| to indicate that the window is in the process 147 // |-windowDidEnterFullScreen:| to indicate that the window is in the process
152 // of transitioning into fullscreen presentation mode. 148 // of transitioning into fullscreen presentation mode.
153 BOOL enteringPresentationMode_; 149 BOOL enteringPresentationMode_;
154 150
155 // The size of the original (non-fullscreen) window. This is saved just 151 // The size of the original (non-fullscreen) window. This is saved just
156 // before entering fullscreen mode and is only valid when |-isFullscreen| 152 // before entering fullscreen mode and is only valid when |-isFullscreen|
157 // returns YES. 153 // returns YES.
158 NSRect savedRegularWindowFrame_; 154 NSRect savedRegularWindowFrame_;
159 155
160 // The proportion of the floating bar which is shown (in presentation mode). 156 // The proportion of the floating bar which is shown (in presentation mode).
161 CGFloat floatingBarShownFraction_; 157 CGFloat floatingBarShownFraction_;
162 158
163 // Whether the omnibox is hidden in fullscreen.
164 fullscreen_mac::SlidingStyle fullscreenStyle_;
165
166 // Various UI elements/events may want to ensure that the floating bar is 159 // Various UI elements/events may want to ensure that the floating bar is
167 // visible (in presentation mode), e.g., because of where the mouse is or 160 // visible (in presentation mode), e.g., because of where the mouse is or
168 // where keyboard focus is. Whenever an object requires bar visibility, it has 161 // where keyboard focus is. Whenever an object requires bar visibility, it has
169 // itself added to |barVisibilityLocks_|. When it no longer requires bar 162 // itself added to |barVisibilityLocks_|. When it no longer requires bar
170 // visibility, it has itself removed. 163 // visibility, it has itself removed.
171 base::scoped_nsobject<NSMutableSet> barVisibilityLocks_; 164 base::scoped_nsobject<NSMutableSet> barVisibilityLocks_;
172 165
173 // Bar visibility locks and releases only result (when appropriate) in changes 166 // Bar visibility locks and releases only result (when appropriate) in changes
174 // in visible state when the following is |YES|. 167 // in visible state when the following is |YES|.
175 BOOL barVisibilityUpdatesEnabled_; 168 BOOL barVisibilityUpdatesEnabled_;
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 517
525 // Whether the system is in the very specific fullscreen mode: Presentation 518 // Whether the system is in the very specific fullscreen mode: Presentation
526 // Mode. 519 // Mode.
527 - (BOOL)inPresentationMode; 520 - (BOOL)inPresentationMode;
528 521
529 // Resizes the fullscreen window to fit the screen it's currently on. Called by 522 // Resizes the fullscreen window to fit the screen it's currently on. Called by
530 // the PresentationModeController when there is a change in monitor placement or 523 // the PresentationModeController when there is a change in monitor placement or
531 // resolution. 524 // resolution.
532 - (void)resizeFullscreenWindow; 525 - (void)resizeFullscreenWindow;
533 526
534 // Gets or sets the fraction of the floating bar (presentation mode overlay)
535 // that is shown. 0 is completely hidden, 1 is fully shown.
536 - (CGFloat)floatingBarShownFraction;
537 - (void)setFloatingBarShownFraction:(CGFloat)fraction;
538
539 // Query/lock/release the requirement that the tab strip/toolbar/attached 527 // Query/lock/release the requirement that the tab strip/toolbar/attached
540 // bookmark bar bar cluster is visible (e.g., when one of its elements has 528 // bookmark bar bar cluster is visible (e.g., when one of its elements has
541 // focus). This is required for the floating bar in presentation mode, but 529 // focus). This is required for the floating bar in presentation mode, but
542 // should also be called when not in presentation mode; see the comments for 530 // should also be called when not in presentation mode; see the comments for
543 // |barVisibilityLocks_| for more details. Double locks/releases by the same 531 // |barVisibilityLocks_| for more details. Double locks/releases by the same
544 // owner are ignored. If |animate:| is YES, then an animation may be performed, 532 // owner are ignored. If |animate:| is YES, then an animation may be performed,
545 // possibly after a small delay if |delay:| is YES. If |animate:| is NO, 533 // possibly after a small delay if |delay:| is YES. If |animate:| is NO,
546 // |delay:| will be ignored. In the case of multiple calls, later calls have 534 // |delay:| will be ignored. In the case of multiple calls, later calls have
547 // precedence with the rule that |animate:NO| has precedence over |animate:YES|, 535 // precedence with the rule that |animate:NO| has precedence over |animate:YES|,
548 // and |delay:NO| has precedence over |delay:YES|. 536 // and |delay:NO| has precedence over |delay:YES|.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 // positioned relative to. 588 // positioned relative to.
601 - (NSRect)omniboxPopupAnchorRect; 589 - (NSRect)omniboxPopupAnchorRect;
602 590
603 // Force a layout of info bars. 591 // Force a layout of info bars.
604 - (void)layoutInfoBars; 592 - (void)layoutInfoBars;
605 593
606 @end // @interface BrowserWindowController (TestingAPI) 594 @end // @interface BrowserWindowController (TestingAPI)
607 595
608 596
609 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ 597 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698