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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h

Issue 1821823004: [Mac][Material Design] Update Omnibox dropdown on Mac to MD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback. Created 4 years, 7 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 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 @interface OmniboxPopupMatrix : NSTableView { 61 @interface OmniboxPopupMatrix : NSTableView {
62 base::scoped_nsobject<OmniboxPopupTableController> matrixController_; 62 base::scoped_nsobject<OmniboxPopupTableController> matrixController_;
63 OmniboxPopupMatrixObserver* observer_; // weak 63 OmniboxPopupMatrixObserver* observer_; // weak
64 ui::ScopedCrTrackingArea trackingArea_; 64 ui::ScopedCrTrackingArea trackingArea_;
65 NSAttributedString* separator_; 65 NSAttributedString* separator_;
66 66
67 // The width of widest match contents in a set of infinite suggestions. 67 // The width of widest match contents in a set of infinite suggestions.
68 CGFloat maxMatchContentsWidth_; 68 CGFloat maxMatchContentsWidth_;
69 69
70 CGFloat answerLineHeight_; 70 CGFloat answerLineHeight_;
71
72 // Left margin padding for the content (i.e. icon and text) in a cell.
73 CGFloat contentLeftPadding_;
74
75 // true if the OmniboxPopupMatrix should use the dark theme style.
76 BOOL hasDarkTheme_;
71 } 77 }
72 78
73 @property(retain, nonatomic) NSAttributedString* separator; 79 @property(retain, nonatomic) NSAttributedString* separator;
74 @property(nonatomic) CGFloat maxMatchContentsWidth; 80 @property(nonatomic) CGFloat maxMatchContentsWidth;
75 @property(nonatomic) CGFloat answerLineHeight; 81 @property(nonatomic) CGFloat answerLineHeight;
82 @property(nonatomic) CGFloat contentLeftPadding;
83 @property(readonly, nonatomic) BOOL hasDarkTheme;
76 84
77 // Create a zero-size matrix. 85 // Create a zero-size matrix.
78 - (instancetype)initWithObserver:(OmniboxPopupMatrixObserver*)observer; 86 - (instancetype)initWithObserver:(OmniboxPopupMatrixObserver*)observer
87 forDarkTheme:(BOOL)isDarkTheme;
79 88
80 // Sets the observer. 89 // Sets the observer.
81 - (void)setObserver:(OmniboxPopupMatrixObserver*)observer; 90 - (void)setObserver:(OmniboxPopupMatrixObserver*)observer;
82 91
83 // Return the currently highlighted row. Returns -1 if no row is highlighted. 92 // Return the currently highlighted row. Returns -1 if no row is highlighted.
84 - (NSInteger)highlightedRow; 93 - (NSInteger)highlightedRow;
85 94
86 // Move the selection to |rowIndex|. 95 // Move the selection to |rowIndex|.
87 - (void)selectRowIndex:(NSInteger)rowIndex; 96 - (void)selectRowIndex:(NSInteger)rowIndex;
88 97
89 // Setup the NSTableView data source. 98 // Setup the NSTableView data source.
90 - (void)setController:(OmniboxPopupTableController*)controller; 99 - (void)setController:(OmniboxPopupTableController*)controller;
91 100
92 @end 101 @end
93 102
94 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_ 103 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_MATRIX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698