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

Unified Diff: chrome/browser/cocoa/tab_controller.h

Issue 500030: Factor tab context menu into a shared model and fix mac and win to use it. Im... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/tab_controller.h
===================================================================
--- chrome/browser/cocoa/tab_controller.h (revision 34596)
+++ chrome/browser/cocoa/tab_controller.h (working copy)
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
#import "chrome/browser/cocoa/hover_close_button.h"
+#include "chrome/browser/tab_menu_model.h"
// The loading/waiting state of the tab.
// TODO(pinkerton): this really doesn't belong here, but something needs to
@@ -20,6 +21,10 @@
kTabCrashed,
};
+@class MenuController;
+namespace TabControllerInternal {
+class MenuDelegate;
+}
@class TabView;
@protocol TabControllerTarget;
@@ -38,7 +43,6 @@
@private
IBOutlet NSView* iconView_;
IBOutlet NSTextField* titleView_;
- IBOutlet NSMenu* contextMenu_;
IBOutlet HoverCloseButton* closeButton_;
NSRect originalIconFrame_; // frame of iconView_ as loaded from nib
@@ -50,6 +54,9 @@
CGFloat titleCloseWidthOffset_; // between right edges of icon and close btn.
id<TabControllerTarget> target_; // weak, where actions are sent
SEL action_; // selector sent when tab is selected by clicking
+ scoped_ptr<TabMenuModel> contextMenuModel_;
+ scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_;
+ scoped_nsobject<MenuController> contextMenuController_;
}
@property(assign, nonatomic) TabLoadingState loadingState;
@@ -74,9 +81,6 @@
// perform the close.
- (IBAction)closeTab:(id)sender;
-// Dispatches the command in the tag to the registered target object.
-- (IBAction)commandDispatch:(id)sender;
-
// Replace the current icon view with the given view. |iconView| will be
// resized to the size of the current icon view.
- (void)setIconView:(NSView*)iconView;

Powered by Google App Engine
This is Rietveld 408576698