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_COCOA_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // See Panel::FullScreenModeChanged. | 118 // See Panel::FullScreenModeChanged. |
119 - (void)fullScreenModeChanged:(bool)isFullScreen; | 119 - (void)fullScreenModeChanged:(bool)isFullScreen; |
120 | 120 |
121 // Helper for NSWindow, returns NO for minimized panels in some cases, so they | 121 // Helper for NSWindow, returns NO for minimized panels in some cases, so they |
122 // are not un-minimized when another panel is minimized. | 122 // are not un-minimized when another panel is minimized. |
123 - (BOOL)canBecomeKeyWindow; | 123 - (BOOL)canBecomeKeyWindow; |
124 | 124 |
125 // Returns true if Panel requested activation of the window. | 125 // Returns true if Panel requested activation of the window. |
126 - (BOOL)activationRequestedByPanel; | 126 - (BOOL)activationRequestedByPanel; |
127 | 127 |
128 - (void)ensureFullyVisible; | |
129 | |
130 // Adjust NSStatusWindowLevel based on whether panel is always on top | 128 // Adjust NSStatusWindowLevel based on whether panel is always on top |
131 // and whether the panel is minimized. The first version wraps the second | 129 // and whether the panel is minimized. The first version wraps the second |
132 // version using the current panel expanstion state. | 130 // version using the current panel expanstion state. |
133 - (void)updateWindowLevel; | 131 - (void)updateWindowLevel; |
134 - (void)updateWindowLevel:(BOOL)panelIsMinimized; | 132 - (void)updateWindowLevel:(BOOL)panelIsMinimized; |
135 | 133 |
136 // Turns on user-resizable corners/sides indications and enables live resize. | 134 // Turns on user-resizable corners/sides indications and enables live resize. |
137 - (void)enableResizeByMouse:(BOOL)enable; | 135 - (void)enableResizeByMouse:(BOOL)enable; |
138 | 136 |
139 - (NSRect)frameRectForContentRect:(NSRect)contentRect; | 137 - (NSRect)frameRectForContentRect:(NSRect)contentRect; |
140 - (NSRect)contentRectForFrameRect:(NSRect)frameRect; | 138 - (NSRect)contentRectForFrameRect:(NSRect)frameRect; |
141 | 139 |
142 @end // @interface PanelWindowController | 140 @end // @interface PanelWindowController |
143 | 141 |
144 #endif // CHROME_BROWSER_UI_COCOA_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 142 #endif // CHROME_BROWSER_UI_COCOA_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
OLD | NEW |