• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef UI_APP_LIST_APP_LIST_MODEL_OBSERVER_H_
6 #define UI_APP_LIST_APP_LIST_MODEL_OBSERVER_H_
7 
8 #include "ui/app_list/app_list_export.h"
9 
10 namespace app_list {
11 
12 class AppListItem;
13 
14 class APP_LIST_EXPORT AppListModelObserver {
15  public:
16   // Invoked when AppListModel's status has changed.
OnAppListModelStatusChanged()17   virtual void OnAppListModelStatusChanged() {}
18 
19   // Triggered after |item| has been added to the model.
OnAppListItemAdded(AppListItem * item)20   virtual void OnAppListItemAdded(AppListItem* item) {}
21 
22   // Triggered just before an item is deleted from the model.
OnAppListItemWillBeDeleted(AppListItem * item)23   virtual void OnAppListItemWillBeDeleted(AppListItem* item) {}
24 
25   // Triggered just after an item is deleted from the model.
OnAppListItemDeleted()26   virtual void OnAppListItemDeleted() {}
27 
28   // Triggered after |item| has moved, changed folders, or changed properties.
OnAppListItemUpdated(AppListItem * item)29   virtual void OnAppListItemUpdated(AppListItem* item) {}
30 
31  protected:
~AppListModelObserver()32   virtual ~AppListModelObserver() {}
33 };
34 
35 }  // namespace app_list
36 
37 #endif  // UI_APP_LIST_APP_LIST_MODEL_OBSERVER_H_
38