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
   42

ash / public / cpp / holding_space / holding_space_model_observer.h [blame]

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_PUBLIC_CPP_HOLDING_SPACE_HOLDING_SPACE_MODEL_OBSERVER_H_
#define ASH_PUBLIC_CPP_HOLDING_SPACE_HOLDING_SPACE_MODEL_OBSERVER_H_

#include <vector>

#include "ash/public/cpp/ash_public_export.h"
#include "base/observer_list_types.h"

namespace ash {

class HoldingSpaceItem;
struct HoldingSpaceItemUpdatedFields;

class ASH_PUBLIC_EXPORT HoldingSpaceModelObserver
    : public base::CheckedObserver {
 public:
  // Called when `items` get added to the holding space model.
  virtual void OnHoldingSpaceItemsAdded(
      const std::vector<const HoldingSpaceItem*>& items) {}

  // Called when `items` get removed from the holding space model.
  virtual void OnHoldingSpaceItemsRemoved(
      const std::vector<const HoldingSpaceItem*>& items) {}

  // Called when a partially initialized holding space `item` gets fully
  // initialized.
  virtual void OnHoldingSpaceItemInitialized(const HoldingSpaceItem* item) {}

  // Called when an `item` gets updated within the holding space model. The
  // specific fields which were updated are provided in `updated_fields`.
  virtual void OnHoldingSpaceItemUpdated(
      const HoldingSpaceItem* item,
      const HoldingSpaceItemUpdatedFields& updated_fields) {}
};

}  // namespace ash

#endif  // ASH_PUBLIC_CPP_HOLDING_SPACE_HOLDING_SPACE_MODEL_OBSERVER_H_