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 #import "chrome/browser/cocoa/fullscreen_controller.h" | 5 #import "chrome/browser/cocoa/fullscreen_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #import "chrome/browser/cocoa/browser_window_controller.h" | 9 #import "chrome/browser/cocoa/browser_window_controller.h" |
10 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 10 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
11 | 11 |
12 const NSString* kWillEnterFullscreenNotification = | 12 NSString* const kWillEnterFullscreenNotification = |
13 @"WillEnterFullscreenNotification"; | 13 @"WillEnterFullscreenNotification"; |
14 const NSString* kWillLeaveFullscreenNotification = | 14 NSString* const kWillLeaveFullscreenNotification = |
15 @"WillLeaveFullscreenNotification"; | 15 @"WillLeaveFullscreenNotification"; |
16 | 16 |
17 namespace { | 17 namespace { |
18 // The activation zone for the main menu is 4 pixels high; if we make it any | 18 // The activation zone for the main menu is 4 pixels high; if we make it any |
19 // smaller, then the menu can be made to appear without the bar sliding down. | 19 // smaller, then the menu can be made to appear without the bar sliding down. |
20 const CGFloat kDropdownActivationZoneHeight = 4; | 20 const CGFloat kDropdownActivationZoneHeight = 4; |
21 const NSTimeInterval kDropdownAnimationDuration = 0.12; | 21 const NSTimeInterval kDropdownAnimationDuration = 0.12; |
22 const NSTimeInterval kMouseExitCheckDelay = 0.1; | 22 const NSTimeInterval kMouseExitCheckDelay = 0.1; |
23 // This show delay attempts to match the delay for the main menu. | 23 // This show delay attempts to match the delay for the main menu. |
24 const NSTimeInterval kDropdownShowDelay = 0.3; | 24 const NSTimeInterval kDropdownShowDelay = 0.3; |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 - (void)hideActiveWindowUI { | 615 - (void)hideActiveWindowUI { |
616 if (currentFullscreenMode_ != mac_util::kFullScreenModeNormal) { | 616 if (currentFullscreenMode_ != mac_util::kFullScreenModeNormal) { |
617 mac_util::ReleaseFullScreen(currentFullscreenMode_); | 617 mac_util::ReleaseFullScreen(currentFullscreenMode_); |
618 currentFullscreenMode_ = mac_util::kFullScreenModeNormal; | 618 currentFullscreenMode_ = mac_util::kFullScreenModeNormal; |
619 } | 619 } |
620 | 620 |
621 // TODO(rohitrao): Remove the Exit Fullscreen button. http://crbug.com/35956 | 621 // TODO(rohitrao): Remove the Exit Fullscreen button. http://crbug.com/35956 |
622 } | 622 } |
623 | 623 |
624 @end | 624 @end |
OLD | NEW |