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_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // This will only be present if the extension action redesign switch is on. | 70 // This will only be present if the extension action redesign switch is on. |
71 base::scoped_nsobject<BrowserActionsController> browserActionsController_; | 71 base::scoped_nsobject<BrowserActionsController> browserActionsController_; |
72 | 72 |
73 // The menu item containing the browser actions overflow container. | 73 // The menu item containing the browser actions overflow container. |
74 NSMenuItem* browserActionsMenuItem_; | 74 NSMenuItem* browserActionsMenuItem_; |
75 } | 75 } |
76 | 76 |
77 // Designated initializer. | 77 // Designated initializer. |
78 - (id)initWithBrowser:(Browser*)browser; | 78 - (id)initWithBrowser:(Browser*)browser; |
79 | 79 |
| 80 // Called by BrowserWindowController when the Browser is being destroyed. |
| 81 - (void)browserWillBeDestroyed; |
| 82 |
80 // Used to dispatch commands from the Wrench menu. The custom items within the | 83 // Used to dispatch commands from the Wrench menu. The custom items within the |
81 // menu cannot be hooked up directly to First Responder because the window in | 84 // menu cannot be hooked up directly to First Responder because the window in |
82 // which the controls reside is not the BrowserWindowController, but a | 85 // which the controls reside is not the BrowserWindowController, but a |
83 // NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system. | 86 // NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system. |
84 - (IBAction)dispatchWrenchMenuCommand:(id)sender; | 87 - (IBAction)dispatchWrenchMenuCommand:(id)sender; |
85 | 88 |
86 // Returns the weak reference to the WrenchMenuModel. | 89 // Returns the weak reference to the WrenchMenuModel. |
87 - (WrenchMenuModel*)wrenchMenuModel; | 90 - (WrenchMenuModel*)wrenchMenuModel; |
88 | 91 |
89 // Creates a RecentTabsMenuModelDelegate instance which will take care of | 92 // Creates a RecentTabsMenuModelDelegate instance which will take care of |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 IBOutlet MenuTrackedRootView* toolbarActionsOverflowItem; | 133 IBOutlet MenuTrackedRootView* toolbarActionsOverflowItem; |
131 @property(assign, nonatomic) | 134 @property(assign, nonatomic) |
132 IBOutlet BrowserActionsContainerView* overflowActionsContainerView; | 135 IBOutlet BrowserActionsContainerView* overflowActionsContainerView; |
133 | 136 |
134 - (id)initWithController:(WrenchMenuController*)controller; | 137 - (id)initWithController:(WrenchMenuController*)controller; |
135 - (IBAction)dispatchWrenchMenuCommand:(id)sender; | 138 - (IBAction)dispatchWrenchMenuCommand:(id)sender; |
136 | 139 |
137 @end | 140 @end |
138 | 141 |
139 #endif // CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ | 142 #endif // CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_ |
OLD | NEW |