| 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_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. |
| 11 | 11 |
| 12 #import <Cocoa/Cocoa.h> | 12 #import <Cocoa/Cocoa.h> |
| 13 | 13 |
| 14 #import "base/mac/cocoa_protocols.h" | 14 #import "base/mac/cocoa_protocols.h" |
| 15 #include "base/memory/scoped_nsobject.h" | 15 #include "base/memory/scoped_nsobject.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #import "chrome/browser/ui/cocoa/browser_command_executor.h" | 18 #import "chrome/browser/ui/cocoa/browser_command_executor.h" |
| 19 #import "chrome/browser/ui/cocoa/chrome_browser_window.h" |
| 19 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" | 20 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" |
| 20 #import "chrome/browser/ui/cocoa/themed_browser_window.h" | |
| 21 #import "chrome/browser/ui/cocoa/themed_window.h" | 21 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 22 #import "chrome/browser/ui/cocoa/tracking_area.h" | 22 #import "chrome/browser/ui/cocoa/tracking_area.h" |
| 23 | 23 |
| 24 @class FindBarCocoaController; | 24 @class FindBarCocoaController; |
| 25 class PanelBrowserWindowCocoa; | 25 class PanelBrowserWindowCocoa; |
| 26 @class PanelTitlebarViewCocoa; | 26 @class PanelTitlebarViewCocoa; |
| 27 | 27 |
| 28 @interface PanelWindowCocoaImpl : ThemedBrowserWindow { | 28 @interface PanelWindowCocoaImpl : ChromeBrowserWindow { |
| 29 } | 29 } |
| 30 // The panels cannot be reduced to 3-px windows on the edge of the screen | 30 // The panels cannot be reduced to 3-px windows on the edge of the screen |
| 31 // active area (above Dock). Default constraining logic makes at least a height | 31 // active area (above Dock). Default constraining logic makes at least a height |
| 32 // of the titlebar visible, so the user could still grab it. We do 'restore' | 32 // of the titlebar visible, so the user could still grab it. We do 'restore' |
| 33 // differently, and minimize panels to 3 px. Hence the need to override the | 33 // differently, and minimize panels to 3 px. Hence the need to override the |
| 34 // constraining logic. | 34 // constraining logic. |
| 35 - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen; | 35 - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen; |
| 36 | 36 |
| 37 // Prevent panel window from becoming key - for example when it is minimized. | 37 // Prevent panel window from becoming key - for example when it is minimized. |
| 38 - (BOOL)canBecomeKeyWindow; | 38 - (BOOL)canBecomeKeyWindow; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // Removes the Key status from the panel to some other window. | 125 // Removes the Key status from the panel to some other window. |
| 126 - (void)deactivate; | 126 - (void)deactivate; |
| 127 | 127 |
| 128 // Helper for NSWindow, returns NO for minimized panels in some cases, so they | 128 // Helper for NSWindow, returns NO for minimized panels in some cases, so they |
| 129 // are not un-minimized when another panel is minimized. | 129 // are not un-minimized when another panel is minimized. |
| 130 - (BOOL)canBecomeKeyWindow; | 130 - (BOOL)canBecomeKeyWindow; |
| 131 | 131 |
| 132 @end // @interface PanelWindowController | 132 @end // @interface PanelWindowController |
| 133 | 133 |
| 134 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 134 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
| OLD | NEW |