Index: chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h |
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h |
index 2ce61674c6b3890e773de072237ebebe06a5aae6..2154dbb75d41a7f4c9c020c5045cfcc0a8386680 100644 |
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h |
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h |
@@ -10,6 +10,26 @@ |
#import "ui/base/cocoa/tracking_area.h" |
#include "ui/base/window_open_disposition.h" |
+@class OmniboxPopupCell; |
+ |
+@interface OmniboxPopupTableController |
+ : NSViewController<NSTableViewDelegate, NSTableViewDataSource> { |
+ @private |
+ base::scoped_nsobject<NSArray> array_; |
+ NSInteger hovered_index_; |
+}; |
+ |
+// Set the hovered highlight. |
+- (void)highlightRowAt:(NSInteger)rowIndex withView:(NSView*)view; |
+ |
+// Which row has the hovered highlight. |
+- (NSInteger)highlightedRow; |
+ |
+// Get the drawing rectangle for the given row. |
+- (NSRect)rectForRow:(NSInteger)rowIndex; |
+ |
+@end |
+ |
@class OmniboxPopupMatrix; |
class OmniboxPopupMatrixDelegate { |
@@ -27,20 +47,28 @@ class OmniboxPopupMatrixDelegate { |
// Sets up a tracking area to implement hover by highlighting the cell the mouse |
// is over. |
-@interface OmniboxPopupMatrix : NSMatrix { |
+@interface OmniboxPopupMatrix : NSTableView { |
OmniboxPopupMatrixDelegate* delegate_; // weak |
ui::ScopedCrTrackingArea trackingArea_; |
+ base::scoped_nsobject<OmniboxPopupTableController> controller_; |
} |
// Create a zero-size matrix. |
- (id)initWithDelegate:(OmniboxPopupMatrixDelegate*)delegate; |
-// Sets the delegate. |
-- (void)setDelegate:(OmniboxPopupMatrixDelegate*)delegate; |
+// Sets the OmniboxPopupMatrixDelegate which is not the same as the NSTableView |
+// delegate. |
+- (void)setTheDelegate:(OmniboxPopupMatrixDelegate*)delegate; |
groby-ooo-7-16
2015/05/07 02:39:59
I'm still objecting to the name. TheDelegate is no
dschuyler
2015/05/07 20:53:10
This is being changed to setObserver.
|
// Return the currently highlighted row. Returns -1 if no row is highlighted. |
- (NSInteger)highlightedRow; |
+// Select the row by turning it 'on'. Turns 'off' prior selection. |
groby-ooo-7-16
2015/05/07 02:39:58
Why the quotes?
dschuyler
2015/05/07 20:53:10
Because I thought on/off were odd labels for selec
|
+- (void)selectRowAt:(NSInteger)rowIndex; |
+ |
+// Setup the information used by the NSTableView data source. |
+- (void)setDataArray:(NSArray*)array; |
+ |
@end |
#endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_ |