summaryrefslogtreecommitdiffstats
path: root/ash/launcher/launcher_model_observer.h
blob: 16067c02efddeb04bea7827386a220537ad1170d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_LAUNCHER_LAUNCHER_MODEL_OBSERVER_H_
#define ASH_LAUNCHER_LAUNCHER_MODEL_OBSERVER_H_

#include "ash/ash_export.h"
#include "ash/launcher/launcher_types.h"

namespace ash {

struct LauncherItem;

class ASH_EXPORT LauncherModelObserver {
 public:
  // Invoked after an item has been added to the model.
  virtual void LauncherItemAdded(int index) = 0;

  // Invoked after an item has been removed. |index| is the index the item was
  // at.
  virtual void LauncherItemRemoved(int index, LauncherID id) = 0;

  // Invoked after an item has been moved. See LauncherModel::Move() for details
  // of the arguments.
  virtual void LauncherItemMoved(int start_index, int target_index) = 0;

  // Invoked when the state of an item changes. |old_item| is the item
  // before the change.
  virtual void LauncherItemChanged(int index, const LauncherItem& old_item) = 0;

  // Invoked when launcher status is changed.
  virtual void LauncherStatusChanged() = 0;

 protected:
  virtual ~LauncherModelObserver() {}
};

}  // namespace ash

#endif  // ASH_LAUNCHER_LAUNCHER_MODEL_OBSERVER_H_