| 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_APP_MENU_APP_MENU_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_APP_MENU_APP_MENU_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_APP_MENU_APP_MENU_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_APP_MENU_APP_MENU_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/mac/objc_property_releaser.h" | |
| 13 #import "base/mac/scoped_nsobject.h" | 12 #import "base/mac/scoped_nsobject.h" |
| 14 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 15 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" | 14 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" |
| 16 #import "ui/base/cocoa/menu_controller.h" | 15 #import "ui/base/cocoa/menu_controller.h" |
| 17 | 16 |
| 18 class BookmarkMenuBridge; | 17 class BookmarkMenuBridge; |
| 19 class Browser; | 18 class Browser; |
| 20 @class BrowserActionsContainerView; | 19 @class BrowserActionsContainerView; |
| 21 @class BrowserActionsController; | 20 @class BrowserActionsController; |
| 22 @class MenuTrackedRootView; | 21 @class MenuTrackedRootView; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 - (BrowserActionsController*)browserActionsController; | 110 - (BrowserActionsController*)browserActionsController; |
| 112 | 111 |
| 113 @end | 112 @end |
| 114 | 113 |
| 115 //////////////////////////////////////////////////////////////////////////////// | 114 //////////////////////////////////////////////////////////////////////////////// |
| 116 | 115 |
| 117 // Shim view controller that merely unpacks objects from a NIB. | 116 // Shim view controller that merely unpacks objects from a NIB. |
| 118 @interface AppMenuButtonViewController : NSViewController { | 117 @interface AppMenuButtonViewController : NSViewController { |
| 119 @private | 118 @private |
| 120 AppMenuController* controller_; | 119 AppMenuController* controller_; |
| 121 | |
| 122 MenuTrackedRootView* editItem_; | |
| 123 NSButton* editCut_; | |
| 124 NSButton* editCopy_; | |
| 125 NSButton* editPaste_; | |
| 126 | |
| 127 MenuTrackedRootView* zoomItem_; | |
| 128 NSButton* zoomPlus_; | |
| 129 NSButton* zoomDisplay_; | |
| 130 NSButton* zoomMinus_; | |
| 131 NSButton* zoomFullScreen_; | |
| 132 | |
| 133 MenuTrackedRootView* toolbarActionsOverflowItem_; | |
| 134 BrowserActionsContainerView* overflowActionsContainerView_; | |
| 135 | |
| 136 base::mac::ObjCPropertyReleaser propertyReleaser_; | |
| 137 } | 120 } |
| 138 | 121 |
| 139 @property(retain, nonatomic) IBOutlet MenuTrackedRootView* editItem; | 122 @property(retain, nonatomic) IBOutlet MenuTrackedRootView* editItem; |
| 140 @property(retain, nonatomic) IBOutlet NSButton* editCut; | 123 @property(retain, nonatomic) IBOutlet NSButton* editCut; |
| 141 @property(retain, nonatomic) IBOutlet NSButton* editCopy; | 124 @property(retain, nonatomic) IBOutlet NSButton* editCopy; |
| 142 @property(retain, nonatomic) IBOutlet NSButton* editPaste; | 125 @property(retain, nonatomic) IBOutlet NSButton* editPaste; |
| 143 @property(retain, nonatomic) IBOutlet MenuTrackedRootView* zoomItem; | 126 @property(retain, nonatomic) IBOutlet MenuTrackedRootView* zoomItem; |
| 144 @property(retain, nonatomic) IBOutlet NSButton* zoomPlus; | 127 @property(retain, nonatomic) IBOutlet NSButton* zoomPlus; |
| 145 @property(retain, nonatomic) IBOutlet NSButton* zoomDisplay; | 128 @property(retain, nonatomic) IBOutlet NSButton* zoomDisplay; |
| 146 @property(retain, nonatomic) IBOutlet NSButton* zoomMinus; | 129 @property(retain, nonatomic) IBOutlet NSButton* zoomMinus; |
| 147 @property(retain, nonatomic) IBOutlet NSButton* zoomFullScreen; | 130 @property(retain, nonatomic) IBOutlet NSButton* zoomFullScreen; |
| 148 @property(retain, nonatomic) | 131 @property(retain, nonatomic) |
| 149 IBOutlet MenuTrackedRootView* toolbarActionsOverflowItem; | 132 IBOutlet MenuTrackedRootView* toolbarActionsOverflowItem; |
| 150 @property(retain, nonatomic) | 133 @property(retain, nonatomic) |
| 151 IBOutlet BrowserActionsContainerView* overflowActionsContainerView; | 134 IBOutlet BrowserActionsContainerView* overflowActionsContainerView; |
| 152 | 135 |
| 153 - (id)initWithController:(AppMenuController*)controller; | 136 - (id)initWithController:(AppMenuController*)controller; |
| 154 - (IBAction)dispatchAppMenuCommand:(id)sender; | 137 - (IBAction)dispatchAppMenuCommand:(id)sender; |
| 155 | 138 |
| 156 @end | 139 @end |
| 157 | 140 |
| 158 #endif // CHROME_BROWSER_UI_COCOA_APP_MENU_APP_MENU_CONTROLLER_H_ | 141 #endif // CHROME_BROWSER_UI_COCOA_APP_MENU_APP_MENU_CONTROLLER_H_ |
| OLD | NEW |