| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ | 
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ | 
| 7 #pragma once | 7 #pragma once | 
| 8 | 8 | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 24   virtual bool CanRemoveRows(const Rows& rows) const; | 24   virtual bool CanRemoveRows(const Rows& rows) const; | 
| 25   virtual void RemoveRows(const Rows& rows); | 25   virtual void RemoveRows(const Rows& rows); | 
| 26   virtual void RemoveAll(); | 26   virtual void RemoveAll(); | 
| 27 | 27 | 
| 28   // Overridden from TableModel: | 28   // Overridden from TableModel: | 
| 29   virtual int RowCount() OVERRIDE; | 29   virtual int RowCount() OVERRIDE; | 
| 30   virtual string16 GetText(int row, int column_id) OVERRIDE; | 30   virtual string16 GetText(int row, int column_id) OVERRIDE; | 
| 31   virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE; | 31   virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE; | 
| 32 | 32 | 
| 33   // Overridden from NotificationObserver: | 33   // Overridden from NotificationObserver: | 
| 34   virtual void Observe(NotificationType type, | 34   virtual void Observe(int type, | 
| 35                        const NotificationSource& source, | 35                        const NotificationSource& source, | 
| 36                        const NotificationDetails& details); | 36                        const NotificationDetails& details); | 
| 37  private: | 37  private: | 
| 38   struct Entry; | 38   struct Entry; | 
| 39 | 39 | 
| 40   void LoadEntries(); | 40   void LoadEntries(); | 
| 41 | 41 | 
| 42   DesktopNotificationService* service_; | 42   DesktopNotificationService* service_; | 
| 43 | 43 | 
| 44   typedef std::vector<Entry> EntriesVector; | 44   typedef std::vector<Entry> EntriesVector; | 
| 45   EntriesVector entries_; | 45   EntriesVector entries_; | 
| 46 | 46 | 
| 47   // We use this variable to prevent ourselves from handling further changes | 47   // We use this variable to prevent ourselves from handling further changes | 
| 48   // that we ourselves caused. | 48   // that we ourselves caused. | 
| 49   bool updates_disabled_; | 49   bool updates_disabled_; | 
| 50   NotificationRegistrar registrar_; | 50   NotificationRegistrar registrar_; | 
| 51   ui::TableModelObserver* observer_; | 51   ui::TableModelObserver* observer_; | 
| 52 | 52 | 
| 53   DISALLOW_COPY_AND_ASSIGN(NotificationExceptionsTableModel); | 53   DISALLOW_COPY_AND_ASSIGN(NotificationExceptionsTableModel); | 
| 54 }; | 54 }; | 
| 55 | 55 | 
| 56 #endif  // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ | 56 #endif  // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_EXCEPTIONS_TABLE_MODEL_H_ | 
| OLD | NEW | 
|---|