Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Side by Side Diff: chrome/browser/cocoa/wrench_menu_controller.h

Issue 3163035: Revert "Clean up the WrenchMenuModel so that it uses SimpleMenu::Delegate." (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_COCOA_WRENCH_MENU_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_
6 #define CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_ 6 #define CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
(...skipping 22 matching lines...) Expand all
33 IBOutlet NSButton* editCut_; 33 IBOutlet NSButton* editCut_;
34 IBOutlet NSButton* editCopy_; 34 IBOutlet NSButton* editCopy_;
35 IBOutlet NSButton* editPaste_; 35 IBOutlet NSButton* editPaste_;
36 36
37 IBOutlet MenuTrackedRootView* zoomItem_; 37 IBOutlet MenuTrackedRootView* zoomItem_;
38 IBOutlet NSButton* zoomPlus_; 38 IBOutlet NSButton* zoomPlus_;
39 IBOutlet NSButton* zoomDisplay_; 39 IBOutlet NSButton* zoomDisplay_;
40 IBOutlet NSButton* zoomMinus_; 40 IBOutlet NSButton* zoomMinus_;
41 IBOutlet NSButton* zoomFullScreen_; 41 IBOutlet NSButton* zoomFullScreen_;
42 42
43 WrenchMenuModel* wrench_model_;
44
45 scoped_ptr<WrenchMenuControllerInternal::ZoomLevelObserver> observer_; 43 scoped_ptr<WrenchMenuControllerInternal::ZoomLevelObserver> observer_;
46 } 44 }
47 45
48 // Designated initializer; called within the NIB. 46 // Designated initializer; called within the NIB.
49 - (id)init; 47 - (id)init;
50 48
51 - (void)setWrenchMenuModel:(WrenchMenuModel*)model;
52
53 // Used to dispatch commands from the Wrench menu. The custom items within the 49 // Used to dispatch commands from the Wrench menu. The custom items within the
54 // menu cannot be hooked up directly to First Responder because the window in 50 // menu cannot be hooked up directly to First Responder because the window in
55 // which the controls reside is not the BrowserWindowController, but a 51 // which the controls reside is not the BrowserWindowController, but a
56 // NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system. 52 // NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system.
57 - (IBAction)dispatchWrenchMenuCommand:(id)sender; 53 - (IBAction)dispatchWrenchMenuCommand:(id)sender;
58 54
59 // Returns the weak reference to the WrenchMenuModel. 55 // Returns the weak reference to the WrenchMenuModel.
60 - (WrenchMenuModel*)wrenchMenuModel; 56 - (WrenchMenuModel*)wrenchMenuModel;
61 57
58 // Inserts the update available notification menu item.
59 - (void)insertUpdateAvailableItem;
60
62 @end 61 @end
63 62
64 //////////////////////////////////////////////////////////////////////////////// 63 ////////////////////////////////////////////////////////////////////////////////
65 64
66 @interface WrenchMenuController (UnitTesting) 65 @interface WrenchMenuController (UnitTesting)
67 // |-dispatchWrenchMenuCommand:| calls this after it has determined the tag of 66 // |-dispatchWrenchMenuCommand:| calls this after it has determined the tag of
68 // the sender. The default implementation executes the command on the outermost 67 // the sender. The default implementation executes the command on the outermost
69 // run loop using |-performSelector...withDelay:|. This is not desirable in 68 // run loop using |-performSelector...withDelay:|. This is not desirable in
70 // unit tests because it's hard to test around run loops in a deterministic 69 // unit tests because it's hard to test around run loops in a deterministic
71 // manner. To avoid those headaches, tests should provide an alternative 70 // manner. To avoid those headaches, tests should provide an alternative
72 // implementation. 71 // implementation.
73 - (void)dispatchCommandInternal:(NSInteger)tag; 72 - (void)dispatchCommandInternal:(NSInteger)tag;
74 @end 73 @end
75 74
76 #endif // CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_ 75 #endif // CHROME_BROWSER_COCOA_WRENCH_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | chrome/browser/cocoa/wrench_menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698