OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 // A class acting as the Objective-C controller for the Browser | 9 // A class acting as the Objective-C controller for the Browser |
10 // object. Handles interactions between Cocoa and the cross-platform | 10 // object. Handles interactions between Cocoa and the cross-platform |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // away from the bottom/top or resized (or zoomed). | 92 // away from the bottom/top or resized (or zoomed). |
93 CGFloat windowTopGrowth_; | 93 CGFloat windowTopGrowth_; |
94 CGFloat windowBottomGrowth_; | 94 CGFloat windowBottomGrowth_; |
95 | 95 |
96 // YES only if we're shrinking the window from an apparent zoomed state (which | 96 // YES only if we're shrinking the window from an apparent zoomed state (which |
97 // we'll only do if we grew it to the zoomed state); needed since we'll then | 97 // we'll only do if we grew it to the zoomed state); needed since we'll then |
98 // restrict the amount of shrinking by the amounts specified above. Reset to | 98 // restrict the amount of shrinking by the amounts specified above. Reset to |
99 // NO on growth. | 99 // NO on growth. |
100 BOOL isShrinkingFromZoomed_; | 100 BOOL isShrinkingFromZoomed_; |
101 | 101 |
102 // Touch event data for two-finger gestures. Only available on Lion or higher | |
103 // with two-finger gestures enabled in the Trackpad preferences. This will | |
104 // contain the NSTouch objects from |-beginGestureWithEvent:| keyed by the | |
105 // touch's |identity|. | |
106 scoped_nsobject<NSMutableDictionary> twoFingerGestureTouches_; | |
107 | |
108 // The raw accumulated zoom value and the actual zoom increments made for an | 102 // The raw accumulated zoom value and the actual zoom increments made for an |
109 // an in-progress pinch gesture. | 103 // an in-progress pinch gesture. |
110 CGFloat totalMagnifyGestureAmount_; | 104 CGFloat totalMagnifyGestureAmount_; |
111 NSInteger currentZoomStepDelta_; | 105 NSInteger currentZoomStepDelta_; |
112 | 106 |
113 // The view controller that manages the incognito badge or the multi-profile | 107 // The view controller that manages the incognito badge or the multi-profile |
114 // avatar icon. The view is always in the view hierarchy, but will be hidden | 108 // avatar icon. The view is always in the view hierarchy, but will be hidden |
115 // unless it's appropriate to show it. | 109 // unless it's appropriate to show it. |
116 scoped_nsobject<AvatarButtonController> avatarButtonController_; | 110 scoped_nsobject<AvatarButtonController> avatarButtonController_; |
117 | 111 |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 - (void)resetWindowGrowthState; | 443 - (void)resetWindowGrowthState; |
450 | 444 |
451 // Computes by how far in each direction, horizontal and vertical, the | 445 // Computes by how far in each direction, horizontal and vertical, the |
452 // |source| rect doesn't fit into |target|. | 446 // |source| rect doesn't fit into |target|. |
453 - (NSSize)overflowFrom:(NSRect)source | 447 - (NSSize)overflowFrom:(NSRect)source |
454 to:(NSRect)target; | 448 to:(NSRect)target; |
455 @end // @interface BrowserWindowController (TestingAPI) | 449 @end // @interface BrowserWindowController (TestingAPI) |
456 | 450 |
457 | 451 |
458 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 452 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |