| 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_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #import "chrome/browser/ui/cocoa/browser_command_executor.h" |
| 16 | 17 |
| 17 @class FindBarCocoaController; | 18 @class FindBarCocoaController; |
| 18 class PanelBrowserWindowCocoa; | 19 class PanelBrowserWindowCocoa; |
| 19 @class PanelTitlebarViewCocoa; | 20 @class PanelTitlebarViewCocoa; |
| 20 | 21 |
| 21 @interface PanelWindowControllerCocoa : NSWindowController<NSWindowDelegate> { | 22 @interface PanelWindowControllerCocoa : NSWindowController<NSWindowDelegate, |
| 23 BrowserCommandExecutor> { |
| 22 @private | 24 @private |
| 23 IBOutlet PanelTitlebarViewCocoa* titlebar_view_; | 25 IBOutlet PanelTitlebarViewCocoa* titlebar_view_; |
| 24 scoped_ptr<PanelBrowserWindowCocoa> windowShim_; | 26 scoped_ptr<PanelBrowserWindowCocoa> windowShim_; |
| 25 } | 27 } |
| 26 | 28 |
| 27 // Load the browser window nib and do any Cocoa-specific initialization. | 29 // Load the browser window nib and do any Cocoa-specific initialization. |
| 28 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window; | 30 - (id)initWithBrowserWindow:(PanelBrowserWindowCocoa*)window; |
| 29 | 31 |
| 30 // Returns the TabContents' native view. It renders the content of the web page | 32 // Returns the TabContents' native view. It renders the content of the web page |
| 31 // in the Panel. | 33 // in the Panel. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 45 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController; | 47 - (void)addFindBar:(FindBarCocoaController*)findBarCocoaController; |
| 46 | 48 |
| 47 // Initiate the closing of the panel, starting from the platform-independent | 49 // Initiate the closing of the panel, starting from the platform-independent |
| 48 // layer. This will take care of PanelManager, other panels and close the | 50 // layer. This will take care of PanelManager, other panels and close the |
| 49 // native window at the end. | 51 // native window at the end. |
| 50 - (void)closePanel; | 52 - (void)closePanel; |
| 51 | 53 |
| 52 // Accessor for titlebar view. | 54 // Accessor for titlebar view. |
| 53 - (PanelTitlebarViewCocoa*)titlebarView; | 55 - (PanelTitlebarViewCocoa*)titlebarView; |
| 54 | 56 |
| 57 // Executes the command in the context of the current browser. |
| 58 // |command| is an integer value containing one of the constants defined in the |
| 59 // "chrome/app/chrome_command_ids.h" file. |
| 60 - (void)executeCommand:(int)command; |
| 61 |
| 55 @end // @interface PanelWindowController | 62 @end // @interface PanelWindowController |
| 56 | 63 |
| 57 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ | 64 #endif // CHROME_BROWSER_UI_PANELS_PANEL_WINDOW_CONTROLLER_COCOA_H_ |
| OLD | NEW |