| 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 UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_ | 5 #ifndef UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_ |
| 6 #define UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_ | 6 #define UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_ |
| 7 | 7 |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "ui/base/models/list_model_observer.h" | 10 #include "ui/base/models/list_model_observer.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 NSMenu* MenuForItem(size_t index); | 27 NSMenu* MenuForItem(size_t index); |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // Lightweight observer to react to icon updates on individual results. | 30 // Lightweight observer to react to icon updates on individual results. |
| 31 class ItemObserver; | 31 class ItemObserver; |
| 32 | 32 |
| 33 void UpdateItemObservers(); | 33 void UpdateItemObservers(); |
| 34 void ReloadDataForItems(size_t start, size_t count) const; | 34 void ReloadDataForItems(size_t start, size_t count) const; |
| 35 | 35 |
| 36 // Overridden from ui::ListModelObserver: | 36 // Overridden from ui::ListModelObserver: |
| 37 virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE; | 37 virtual void ListItemsAdded(size_t start, size_t count) override; |
| 38 virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE; | 38 virtual void ListItemsRemoved(size_t start, size_t count) override; |
| 39 virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE; | 39 virtual void ListItemMoved(size_t index, size_t target_index) override; |
| 40 virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE; | 40 virtual void ListItemsChanged(size_t start, size_t count) override; |
| 41 | 41 |
| 42 AppsSearchResultsController* parent_; // Weak. Owns us. | 42 AppsSearchResultsController* parent_; // Weak. Owns us. |
| 43 ScopedVector<ItemObserver> item_observers_; | 43 ScopedVector<ItemObserver> item_observers_; |
| 44 | 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(AppsSearchResultsModelBridge); | 45 DISALLOW_COPY_AND_ASSIGN(AppsSearchResultsModelBridge); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace app_list | 48 } // namespace app_list |
| 49 | 49 |
| 50 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_ | 50 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_ |
| OLD | NEW |