| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_VIEW_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_VIEW_MODEL_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_MODEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 class SkBitmap; | 9 class SkBitmap; |
| 10 | 10 |
| 11 // An interface implemented by an object that provides data to populate | 11 // An interface implemented by an object that provides data to populate |
| 12 // individual result views. | 12 // individual result views. |
| 13 class AutocompleteResultViewModel { | 13 class OmniboxResultViewModel { |
| 14 public: | 14 public: |
| 15 // Returns true if the index is selected. | 15 // Returns true if the index is selected. |
| 16 virtual bool IsSelectedIndex(size_t index) const = 0; | 16 virtual bool IsSelectedIndex(size_t index) const = 0; |
| 17 | 17 |
| 18 // Returns true if the index is hovered. | 18 // Returns true if the index is hovered. |
| 19 virtual bool IsHoveredIndex(size_t index) const = 0; | 19 virtual bool IsHoveredIndex(size_t index) const = 0; |
| 20 | 20 |
| 21 // If |index| is a match from an extension, returns the extension icon; | 21 // If |index| is a match from an extension, returns the extension icon; |
| 22 // otherwise returns NULL. | 22 // otherwise returns NULL. |
| 23 virtual const SkBitmap* GetIconIfExtensionMatch(size_t index) const = 0; | 23 virtual const SkBitmap* GetIconIfExtensionMatch(size_t index) const = 0; |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 #endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_VIEW_MODEL_H
_ | 26 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_MODEL_H_ |
| OLD | NEW |