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/memory/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/app_list/app_list_model.h" | 10 #include "ui/app_list/app_list_model.h" |
11 #include "ui/base/models/list_model_observer.h" | 11 #include "ui/base/models/list_model_observer.h" |
12 | 12 |
13 @class NSTableView; | 13 @class NSTableView; |
14 | 14 |
15 namespace app_list { | 15 namespace app_list { |
16 | 16 |
17 // Bridge observing the ListModel representing search results in the app list, | 17 // Bridge observing the ListModel representing search results in the app list, |
18 // and updating the NSTableView where they are displayed. | 18 // and updating the NSTableView where they are displayed. |
(...skipping 10 matching lines...) Expand all Loading... |
29 void UpdateItemObservers(); | 29 void UpdateItemObservers(); |
30 void ReloadDataForItems(size_t start, size_t count) const; | 30 void ReloadDataForItems(size_t start, size_t count) const; |
31 | 31 |
32 // Overridden from ui::ListModelObserver: | 32 // Overridden from ui::ListModelObserver: |
33 virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE; | 33 virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE; |
34 virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE; | 34 virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE; |
35 virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE; | 35 virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE; |
36 virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE; | 36 virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE; |
37 | 37 |
38 AppListModel::SearchResults* results_; // Weak. Owned by AppListModel. | 38 AppListModel::SearchResults* results_; // Weak. Owned by AppListModel. |
39 scoped_nsobject<NSTableView> table_view_; | 39 base::scoped_nsobject<NSTableView> table_view_; |
40 ScopedVector<ItemObserver> item_observers_; | 40 ScopedVector<ItemObserver> item_observers_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(AppsSearchResultsModelBridge); | 42 DISALLOW_COPY_AND_ASSIGN(AppsSearchResultsModelBridge); |
43 }; | 43 }; |
44 | 44 |
45 } // namespace app_list | 45 } // namespace app_list |
46 | 46 |
47 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_ | 47 #endif // UI_APP_LIST_COCOA_APPS_SEARCH_RESULTS_MODEL_BRIDGE_H_ |
OLD | NEW |