dom_distiller_observer.h revision a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7
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
3// found in the LICENSE file.
4
5#ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_OBSERVER_H_
6#define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_OBSERVER_H_
7
8#include <vector>
9#include "components/dom_distiller/core/article_entry.h"
10
11namespace dom_distiller {
12
13// Provides notifications for any mutations to entries of the reading list.
14class DomDistillerObserver {
15 public:
16  // An update to an article entry.
17  struct ArticleUpdate {
18    enum UpdateType {
19      ADD,
20      UPDATE,
21      REMOVE
22    };
23    std::string entry_id;
24    UpdateType update_type;
25  };
26
27  virtual void ArticleEntriesUpdated(
28      const std::vector<ArticleUpdate>& updates) = 0;
29
30 protected:
31  DomDistillerObserver() {}
32  virtual ~DomDistillerObserver() {}
33
34  DISALLOW_COPY_AND_ASSIGN(DomDistillerObserver);
35};
36
37}  // namespace dom_distiller
38
39#endif  // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_OBSERVER_H_
40