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
3 // found in the LICENSE file.
5 #ifndef UI_APP_LIST_APP_LIST_MODEL_OBSERVER_H_
6 #define UI_APP_LIST_APP_LIST_MODEL_OBSERVER_H_
8 #include "ui/app_list/app_list_export.h"
9 #include "ui/app_list/app_list_model.h"
15 class APP_LIST_EXPORT AppListModelObserver
{
17 // Triggered after AppListModel's status has changed.
18 virtual void OnAppListModelStatusChanged() {}
20 // Triggered after AppListModel's state has changed.
21 virtual void OnAppListModelStateChanged(AppListModel::State old_state
,
22 AppListModel::State new_state
) {}
24 // Triggered after |item| has been added to the model.
25 virtual void OnAppListItemAdded(AppListItem
* item
) {}
27 // Triggered just before an item is deleted from the model.
28 virtual void OnAppListItemWillBeDeleted(AppListItem
* item
) {}
30 // Triggered just after an item is deleted from the model.
31 virtual void OnAppListItemDeleted() {}
33 // Triggered after |item| has moved, changed folders, or changed properties.
34 virtual void OnAppListItemUpdated(AppListItem
* item
) {}
36 // Triggered when the custom launcher page enabled state is changed.
37 virtual void OnCustomLauncherPageEnabledStateChanged(bool enabled
) {}
39 // Triggered when the search engine is changed to and from Google.
40 virtual void OnSearchEngineIsGoogleChanged(bool is_google
) {}
43 virtual ~AppListModelObserver() {}
46 } // namespace app_list
48 #endif // UI_APP_LIST_APP_LIST_MODEL_OBSERVER_H_