OLD | NEW |
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_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
7 | 7 |
8 // A class acting as the Objective-C controller for the Panel window | 8 // A class acting as the Objective-C controller for the Panel window |
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 titlebar and is managed/owned by Panel. | 10 // code. Each window has a single titlebar and is managed/owned by Panel. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 scoped_ptr<PanelBrowserWindowCocoa> windowShim_; | 48 scoped_ptr<PanelBrowserWindowCocoa> windowShim_; |
49 scoped_nsobject<NSString> pendingWindowTitle_; | 49 scoped_nsobject<NSString> pendingWindowTitle_; |
50 scoped_nsobject<TabContentsController> contentsController_; | 50 scoped_nsobject<TabContentsController> contentsController_; |
51 NSViewAnimation* boundsAnimation_; // Lifetime controlled manually, needs | 51 NSViewAnimation* boundsAnimation_; // Lifetime controlled manually, needs |
52 // more then just |release| to terminate. | 52 // more then just |release| to terminate. |
53 BOOL animateOnBoundsChange_; | 53 BOOL animateOnBoundsChange_; |
54 ScopedCrTrackingArea windowTrackingArea_; | 54 ScopedCrTrackingArea windowTrackingArea_; |
55 BOOL throbberShouldSpin_; | 55 BOOL throbberShouldSpin_; |
56 BOOL playingMinimizeAnimation_; | 56 BOOL playingMinimizeAnimation_; |
57 float animationStopToShowTitlebarOnly_; | 57 float animationStopToShowTitlebarOnly_; |
| 58 BOOL canBecomeKeyWindow_; |
58 } | 59 } |
59 | 60 |
60 // Load the browser window nib and do any Cocoa-specific initialization. | 61 // Load the browser window nib and do any Cocoa-specific initialization. |
61 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window; | 62 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window; |
62 | 63 |
63 - (ui::ThemeProvider*)themeProvider; | 64 - (ui::ThemeProvider*)themeProvider; |
64 - (ThemedWindowStyle)themedWindowStyle; | 65 - (ThemedWindowStyle)themedWindowStyle; |
65 - (NSPoint)themePatternPhase; | 66 - (NSPoint)themePatternPhase; |
66 | 67 |
67 - (void)tabInserted:(content::WebContents*)contents; | 68 - (void)tabInserted:(content::WebContents*)contents; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // NSAnimationDelegate method, invoked when bounds animation is finished. | 126 // NSAnimationDelegate method, invoked when bounds animation is finished. |
126 - (void)animationDidEnd:(NSAnimation*)animation; | 127 - (void)animationDidEnd:(NSAnimation*)animation; |
127 // Terminates current bounds animation, if any. | 128 // Terminates current bounds animation, if any. |
128 - (void)terminateBoundsAnimation; | 129 - (void)terminateBoundsAnimation; |
129 | 130 |
130 - (BOOL)isAnimatingBounds; | 131 - (BOOL)isAnimatingBounds; |
131 | 132 |
132 // Removes the Key status from the panel to some other window. | 133 // Removes the Key status from the panel to some other window. |
133 - (void)deactivate; | 134 - (void)deactivate; |
134 | 135 |
| 136 // Changes the canBecomeKeyWindow state |
| 137 - (void)preventBecomingKeyWindow:(BOOL)prevent; |
| 138 |
135 // See Panel::FullScreenModeChanged. | 139 // See Panel::FullScreenModeChanged. |
136 - (void)fullScreenModeChanged:(bool)isFullScreen; | 140 - (void)fullScreenModeChanged:(bool)isFullScreen; |
137 | 141 |
138 // Helper for NSWindow, returns NO for minimized panels in some cases, so they | 142 // Helper for NSWindow, returns NO for minimized panels in some cases, so they |
139 // are not un-minimized when another panel is minimized. | 143 // are not un-minimized when another panel is minimized. |
140 - (BOOL)canBecomeKeyWindow; | 144 - (BOOL)canBecomeKeyWindow; |
141 | 145 |
142 // Returns width of titlebar when shown in "icon only" mode. | 146 // Returns width of titlebar when shown in "icon only" mode. |
143 - (int)titlebarIconOnlyWidthInScreenCoordinates; | 147 - (int)titlebarIconOnlyWidthInScreenCoordinates; |
144 | 148 |
145 - (void)ensureFullyVisible; | 149 - (void)ensureFullyVisible; |
146 | 150 |
147 @end // @interface PanelWindowController | 151 @end // @interface PanelWindowController |
148 | 152 |
149 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 153 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
OLD | NEW |