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

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

Issue 1099403005: [AiS] changing mac omnibox suggestions form NSMatrix to NSTableView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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_CELL_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_CELL_H_
6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_CELL_H_ 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_CELL_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "components/omnibox/autocomplete_match.h" 11 #include "components/omnibox/autocomplete_match.h"
12 12
13 class OmniboxPopupViewMac; 13 class OmniboxPopupViewMac;
14 14
15 // OmniboxPopupCell overrides how backgrounds are displayed to 15 // OmniboxPopupCell overrides how backgrounds are displayed to
16 // handle hover versus selected. So long as we're in there, it also 16 // handle hover versus selected. So long as we're in there, it also
17 // provides some default initialization. 17 // provides some default initialization.
18 @interface OmniboxPopupCell : NSButtonCell { 18 @interface OmniboxPopupCell : NSButtonCell<NSCopying> {
19 @private 19 @private
20 // The popup view parent of this cell.
21 OmniboxPopupViewMac* parent_;
dschuyler 2015/04/24 18:43:08 This wasn't being used.
groby-ooo-7-16 2015/04/24 20:11:16 If it's not used in existing code, might as well s
Scott Hess - ex-Googler 2015/04/25 06:04:27 I support this message. Also, I notice that a lot
22
23 // The match which will be rendered for this row in omnibox dropdown. 20 // The match which will be rendered for this row in omnibox dropdown.
24 AutocompleteMatch match_; 21 AutocompleteMatch match_;
25 22
26 // NSAttributedString instances for various match components. 23 // NSAttributedString instances for various match components.
27 base::scoped_nsobject<NSAttributedString> separator_; 24 base::scoped_nsobject<NSAttributedString> separator_;
28 base::scoped_nsobject<NSAttributedString> description_; 25 base::scoped_nsobject<NSAttributedString> description_;
29 26
30 // NOTE: While |prefix_| is used only for postfix suggestions, it still needs 27 // NOTE: While |prefix_| is used only for postfix suggestions, it still needs
31 // to be a member of the class. This allows the |NSAttributedString| instance 28 // to be a member of the class. This allows the |NSAttributedString| instance
32 // to stay alive between the call to |drawTitle| and the actual paint event 29 // to stay alive between the call to |drawTitle| and the actual paint event
(...skipping 17 matching lines...) Expand all
50 - (CGFloat)getMatchContentsWidth; 47 - (CGFloat)getMatchContentsWidth;
51 48
52 // Returns the offset of the start of the contents in the input text for the 49 // Returns the offset of the start of the contents in the input text for the
53 // given match. It is costly to compute this offset, so it is computed once and 50 // given match. It is costly to compute this offset, so it is computed once and
54 // shared by all OmniboxPopupCell instances through OmniboxPopupViewMac parent. 51 // shared by all OmniboxPopupCell instances through OmniboxPopupViewMac parent.
55 + (CGFloat)computeContentsOffset:(const AutocompleteMatch&)match; 52 + (CGFloat)computeContentsOffset:(const AutocompleteMatch&)match;
56 53
57 @end 54 @end
58 55
59 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_CELL_H_ 56 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_CELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698