| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_ | 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 NSAttributedString* separator_; | 65 NSAttributedString* separator_; |
| 66 | 66 |
| 67 // The width of widest match contents in a set of tail suggestions. | 67 // The width of widest match contents in a set of tail suggestions. |
| 68 CGFloat maxMatchContentsWidth_; | 68 CGFloat maxMatchContentsWidth_; |
| 69 | 69 |
| 70 CGFloat answerLineHeight_; | 70 CGFloat answerLineHeight_; |
| 71 | 71 |
| 72 // Left margin padding for the content (i.e. icon and text) in a cell. | 72 // Left margin padding for the content (i.e. icon and text) in a cell. |
| 73 CGFloat contentLeftPadding_; | 73 CGFloat contentLeftPadding_; |
| 74 | 74 |
| 75 // Max width for the content in the cell. |
| 76 CGFloat contentMaxWidth_; |
| 77 |
| 75 // true if the OmniboxPopupMatrix should use the dark theme style. | 78 // true if the OmniboxPopupMatrix should use the dark theme style. |
| 76 BOOL hasDarkTheme_; | 79 BOOL hasDarkTheme_; |
| 77 } | 80 } |
| 78 | 81 |
| 79 @property(retain, nonatomic) NSAttributedString* separator; | 82 @property(retain, nonatomic) NSAttributedString* separator; |
| 80 @property(nonatomic) CGFloat maxMatchContentsWidth; | 83 @property(nonatomic) CGFloat maxMatchContentsWidth; |
| 81 @property(nonatomic) CGFloat answerLineHeight; | 84 @property(nonatomic) CGFloat answerLineHeight; |
| 82 @property(nonatomic) CGFloat contentLeftPadding; | 85 @property(nonatomic) CGFloat contentLeftPadding; |
| 86 @property(nonatomic) CGFloat contentMaxWidth; |
| 83 @property(readonly, nonatomic) BOOL hasDarkTheme; | 87 @property(readonly, nonatomic) BOOL hasDarkTheme; |
| 84 | 88 |
| 85 // Create a zero-size matrix. | 89 // Create a zero-size matrix. |
| 86 - (instancetype)initWithObserver:(OmniboxPopupMatrixObserver*)observer | 90 - (instancetype)initWithObserver:(OmniboxPopupMatrixObserver*)observer |
| 87 forDarkTheme:(BOOL)isDarkTheme; | 91 forDarkTheme:(BOOL)isDarkTheme; |
| 88 | 92 |
| 89 // Sets the observer. | 93 // Sets the observer. |
| 90 - (void)setObserver:(OmniboxPopupMatrixObserver*)observer; | 94 - (void)setObserver:(OmniboxPopupMatrixObserver*)observer; |
| 91 | 95 |
| 92 // Return the currently highlighted row. Returns -1 if no row is highlighted. | 96 // Return the currently highlighted row. Returns -1 if no row is highlighted. |
| 93 - (NSInteger)highlightedRow; | 97 - (NSInteger)highlightedRow; |
| 94 | 98 |
| 95 // Move the selection to |rowIndex|. | 99 // Move the selection to |rowIndex|. |
| 96 - (void)selectRowIndex:(NSInteger)rowIndex; | 100 - (void)selectRowIndex:(NSInteger)rowIndex; |
| 97 | 101 |
| 98 // Setup the NSTableView data source. | 102 // Setup the NSTableView data source. |
| 99 - (void)setController:(OmniboxPopupTableController*)controller; | 103 - (void)setController:(OmniboxPopupTableController*)controller; |
| 100 | 104 |
| 101 @end | 105 @end |
| 102 | 106 |
| 103 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_ | 107 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_ |
| OLD | NEW |