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 29 matching lines...) Expand all Loading... |
40 @class InfoBarContainerController; | 40 @class InfoBarContainerController; |
41 class LocationBarViewMac; | 41 class LocationBarViewMac; |
42 @class PreviewableContentsController; | 42 @class PreviewableContentsController; |
43 @class SidebarController; | 43 @class SidebarController; |
44 class StatusBubbleMac; | 44 class StatusBubbleMac; |
45 class TabContents; | 45 class TabContents; |
46 @class TabStripController; | 46 @class TabStripController; |
47 @class TabStripView; | 47 @class TabStripView; |
48 @class ToolbarController; | 48 @class ToolbarController; |
49 | 49 |
50 | |
51 @interface BrowserWindowController : | 50 @interface BrowserWindowController : |
52 TabWindowController<NSUserInterfaceValidations, | 51 TabWindowController<NSUserInterfaceValidations, |
53 BookmarkBarControllerDelegate, | 52 BookmarkBarControllerDelegate, |
54 BrowserCommandExecutor, | 53 BrowserCommandExecutor, |
55 ViewResizer, | 54 ViewResizer, |
56 TabContentsControllerDelegate, | 55 TabContentsControllerDelegate, |
57 TabStripControllerDelegate> { | 56 TabStripControllerDelegate> { |
58 @private | 57 @private |
59 // The ordering of these members is important as it determines the order in | 58 // The ordering of these members is important as it determines the order in |
60 // which they are destroyed. |browser_| needs to be destroyed last as most of | 59 // which they are destroyed. |browser_| needs to be destroyed last as most of |
(...skipping 28 matching lines...) Expand all Loading... |
89 // away from the bottom/top or resized (or zoomed). | 88 // away from the bottom/top or resized (or zoomed). |
90 CGFloat windowTopGrowth_; | 89 CGFloat windowTopGrowth_; |
91 CGFloat windowBottomGrowth_; | 90 CGFloat windowBottomGrowth_; |
92 | 91 |
93 // YES only if we're shrinking the window from an apparent zoomed state (which | 92 // YES only if we're shrinking the window from an apparent zoomed state (which |
94 // we'll only do if we grew it to the zoomed state); needed since we'll then | 93 // we'll only do if we grew it to the zoomed state); needed since we'll then |
95 // restrict the amount of shrinking by the amounts specified above. Reset to | 94 // restrict the amount of shrinking by the amounts specified above. Reset to |
96 // NO on growth. | 95 // NO on growth. |
97 BOOL isShrinkingFromZoomed_; | 96 BOOL isShrinkingFromZoomed_; |
98 | 97 |
| 98 // Touch event data for two-finger gestures. Only available on Lion or higher |
| 99 // with two-finger gestures enabled in the Trackpad preferences. This will |
| 100 // contain the NSTouch objects from |-beginGestureWithEvent:| keyed by the |
| 101 // touch's |identity|. |
| 102 scoped_nsobject<NSMutableDictionary> twoFingerGestureTouches_; |
| 103 |
99 // The raw accumulated zoom value and the actual zoom increments made for an | 104 // The raw accumulated zoom value and the actual zoom increments made for an |
100 // an in-progress pinch gesture. | 105 // an in-progress pinch gesture. |
101 CGFloat totalMagnifyGestureAmount_; | 106 CGFloat totalMagnifyGestureAmount_; |
102 NSInteger currentZoomStepDelta_; | 107 NSInteger currentZoomStepDelta_; |
103 | 108 |
104 // The view that shows the incognito badge or the multi-profile avatar icon. | 109 // The view that shows the incognito badge or the multi-profile avatar icon. |
105 // Nil if neither is present. Needed to access the view to move it to/from the | 110 // Nil if neither is present. Needed to access the view to move it to/from the |
106 // fullscreen window. | 111 // fullscreen window. |
107 scoped_nsobject<AvatarButton> avatarButton_; | 112 scoped_nsobject<AvatarButton> avatarButton_; |
108 | 113 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 - (void)resetWindowGrowthState; | 411 - (void)resetWindowGrowthState; |
407 | 412 |
408 // Computes by how far in each direction, horizontal and vertical, the | 413 // Computes by how far in each direction, horizontal and vertical, the |
409 // |source| rect doesn't fit into |target|. | 414 // |source| rect doesn't fit into |target|. |
410 - (NSSize)overflowFrom:(NSRect)source | 415 - (NSSize)overflowFrom:(NSRect)source |
411 to:(NSRect)target; | 416 to:(NSRect)target; |
412 @end // @interface BrowserWindowController (TestingAPI) | 417 @end // @interface BrowserWindowController (TestingAPI) |
413 | 418 |
414 | 419 |
415 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ | 420 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_CONTROLLER_H_ |
OLD | NEW |