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