| 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 3bfd3c2cc08b5c48cf702beb58a14dfb52363eb4..73b590ba48e3988505a9cb4789e655df099bff66 100644
|
| --- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h
|
| +++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h
|
| @@ -10,6 +10,30 @@
|
| #import "ui/base/cocoa/tracking_area.h"
|
| #include "ui/base/window_open_disposition.h"
|
|
|
| +class AutocompleteResult;
|
| +@class OmniboxPopupCell;
|
| +class OmniboxPopupViewMac;
|
| +
|
| +@interface OmniboxPopupTableController
|
| + : NSViewController<NSTableViewDelegate, NSTableViewDataSource> {
|
| + @private
|
| + base::scoped_nsobject<NSMutableArray> array_;
|
| + NSInteger hoveredIndex_;
|
| +};
|
| +
|
| +// Setup the information used by the NSTableView data source.
|
| +- (instancetype)initWithMatchResults:(const AutocompleteResult&)result
|
| + popupView:(const OmniboxPopupViewMac&)popupView
|
| + answerImage:(NSImage*)answerImage;
|
| +
|
| +// Set the hovered highlight.
|
| +- (void)highlightRowAt:(NSInteger)rowIndex;
|
| +
|
| +// Which row has the hovered highlight.
|
| +- (NSInteger)highlightedRow;
|
| +
|
| +@end
|
| +
|
| @class OmniboxPopupMatrix;
|
|
|
| class OmniboxPopupMatrixObserver {
|
| @@ -27,13 +51,14 @@ class OmniboxPopupMatrixObserver {
|
|
|
| // Sets up a tracking area to implement hover by highlighting the cell the mouse
|
| // is over.
|
| -@interface OmniboxPopupMatrix : NSMatrix {
|
| +@interface OmniboxPopupMatrix : NSTableView {
|
| + base::scoped_nsobject<OmniboxPopupTableController> matrixController_;
|
| OmniboxPopupMatrixObserver* observer_; // weak
|
| ui::ScopedCrTrackingArea trackingArea_;
|
| }
|
|
|
| // Create a zero-size matrix.
|
| -- (id)initWithObserver:(OmniboxPopupMatrixObserver*)observer;
|
| +- (instancetype)initWithObserver:(OmniboxPopupMatrixObserver*)observer;
|
|
|
| // Sets the delegate.
|
| - (void)setObserver:(OmniboxPopupMatrixObserver*)observer;
|
| @@ -41,6 +66,12 @@ class OmniboxPopupMatrixObserver {
|
| // Return the currently highlighted row. Returns -1 if no row is highlighted.
|
| - (NSInteger)highlightedRow;
|
|
|
| +// Move the selection to |rowIndex|.
|
| +- (void)selectRowIndex:(NSInteger)rowIndex;
|
| +
|
| +// Setup the NSTableView data source.
|
| +- (void)setController:(OmniboxPopupTableController*)controller;
|
| +
|
| @end
|
|
|
| #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_
|
|
|