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

Unified Diff: chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_visibility_lock_controller.h

Issue 2459653005: [Mac] Refactor the Fullscreen Toolbar Visibility Locks (Closed)
Patch Set: Fix for rsesek Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_visibility_lock_controller.h
diff --git a/chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_visibility_lock_controller.h b/chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_visibility_lock_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..d4284a3e8322be2395a3740816e6ecf730d92c3d
--- /dev/null
+++ b/chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_visibility_lock_controller.h
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_VISIBLITY_LOCK_CONTROLLER_H_
+#define CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_VISIBLITY_LOCK_CONTROLLER_H_
+
+#import <Cocoa/Cocoa.h>
+
+class FullscreenToolbarAnimationController;
+@class FullscreenToolbarController;
+
+// Various UI elements/events may want to ensure that the toolbar is visible in
+// fullscreen mode. Whenever an object requires toolbar visibility, it locks
+// it. When it no longer requires it, it releases it. This class manages the
+// toolbar visibility locks.
+@interface FullscreenToolbarVisibilityLockController : NSObject
+
+// The designated initializer.
+- (instancetype)
+initWithFullscreenToolbarController:(FullscreenToolbarController*)controller
+ animationController:
+ (FullscreenToolbarAnimationController*)animationController;
+
+// Returns true if the toolbar visibility is locked.
+- (BOOL)isToolbarVisibilityLocked;
+
+// Returns true if the toolbar visibility is locked by |owner|.
+- (BOOL)isToolbarVisibilityLockedForOwner:(id)owner;
+
+// Methods for locking and releasing the toolbar visibility. If |animate| is
+// true, the toolbar will animate in/out.
+- (void)lockToolbarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate;
+- (void)releaseToolbarVisibilityForOwner:(id)owner withAnimation:(BOOL)animate;
+
+@end
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698