| 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_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/autocomplete/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 { |
| 19 @private | 19 @private |
| 20 // The popup view parent of this cell. | 20 // The popup view parent of this cell. |
| 21 OmniboxPopupViewMac* parent_; | 21 OmniboxPopupViewMac* parent_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 50 - (CGFloat)getMatchContentsWidth; | 50 - (CGFloat)getMatchContentsWidth; |
| 51 | 51 |
| 52 // Returns the offset of the start of the contents in the input text for the | 52 // 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 | 53 // given match. It is costly to compute this offset, so it is computed once and |
| 54 // shared by all OmniboxPopupCell instances through OmniboxPopupViewMac parent. | 54 // shared by all OmniboxPopupCell instances through OmniboxPopupViewMac parent. |
| 55 + (CGFloat)computeContentsOffset:(const AutocompleteMatch&)match; | 55 + (CGFloat)computeContentsOffset:(const AutocompleteMatch&)match; |
| 56 | 56 |
| 57 @end | 57 @end |
| 58 | 58 |
| 59 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_CELL_H_ | 59 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_POPUP_CELL_H_ |
| OLD | NEW |