| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PLUGIN_EXCEPTIONS_TABLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_PLUGIN_EXCEPTIONS_TABLE_MODEL_H_ |
| 6 #define CHROME_BROWSER_PLUGIN_EXCEPTIONS_TABLE_MODEL_H_ | 6 #define CHROME_BROWSER_PLUGIN_EXCEPTIONS_TABLE_MODEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "chrome/browser/content_settings/host_content_settings_map.h" | 13 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 14 #include "chrome/browser/remove_rows_table_model.h" | 14 #include "chrome/browser/remove_rows_table_model.h" |
| 15 #include "chrome/common/notification_observer.h" | 15 #include "chrome/common/notification_observer.h" |
| 16 #include "webkit/glue/plugins/plugin_list.h" | 16 #include "webkit/plugins/npapi/plugin_list.h" |
| 17 | 17 |
| 18 struct WebPluginInfo; | 18 struct WebPluginInfo; |
| 19 | 19 |
| 20 class PluginExceptionsTableModel : public RemoveRowsTableModel, | 20 class PluginExceptionsTableModel : public RemoveRowsTableModel, |
| 21 public NotificationObserver { | 21 public NotificationObserver { |
| 22 public: | 22 public: |
| 23 PluginExceptionsTableModel(HostContentSettingsMap* content_settings_map, | 23 PluginExceptionsTableModel(HostContentSettingsMap* content_settings_map, |
| 24 HostContentSettingsMap* otr_content_settings_map); | 24 HostContentSettingsMap* otr_content_settings_map); |
| 25 virtual ~PluginExceptionsTableModel(); | 25 virtual ~PluginExceptionsTableModel(); |
| 26 | 26 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 41 virtual Groups GetGroups(); | 41 virtual Groups GetGroups(); |
| 42 virtual int GetGroupID(int row); | 42 virtual int GetGroupID(int row); |
| 43 | 43 |
| 44 // NotificationObserver methods: | 44 // NotificationObserver methods: |
| 45 virtual void Observe(NotificationType type, | 45 virtual void Observe(NotificationType type, |
| 46 const NotificationSource& source, | 46 const NotificationSource& source, |
| 47 const NotificationDetails& details); | 47 const NotificationDetails& details); |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 // Subclasses can override this method for testing. | 50 // Subclasses can override this method for testing. |
| 51 virtual void GetPlugins(std::vector<PluginGroup>* plugin_groups); | 51 virtual void GetPlugins( |
| 52 std::vector<webkit::npapi::PluginGroup>* plugin_groups); |
| 52 | 53 |
| 53 private: | 54 private: |
| 54 friend class PluginExceptionsTableModelTest; | 55 friend class PluginExceptionsTableModelTest; |
| 55 | 56 |
| 56 struct SettingsEntry { | 57 struct SettingsEntry { |
| 57 ContentSettingsPattern pattern; | 58 ContentSettingsPattern pattern; |
| 58 int plugin_id; | 59 int plugin_id; |
| 59 ContentSetting setting; | 60 ContentSetting setting; |
| 60 bool is_otr; | 61 bool is_otr; |
| 61 }; | 62 }; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 72 TableModel::Groups groups_; | 73 TableModel::Groups groups_; |
| 73 | 74 |
| 74 NotificationRegistrar registrar_; | 75 NotificationRegistrar registrar_; |
| 75 bool updates_disabled_; | 76 bool updates_disabled_; |
| 76 TableModelObserver* observer_; | 77 TableModelObserver* observer_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(PluginExceptionsTableModel); | 79 DISALLOW_COPY_AND_ASSIGN(PluginExceptionsTableModel); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 #endif // CHROME_BROWSER_PLUGIN_EXCEPTIONS_TABLE_MODEL_H_ | 82 #endif // CHROME_BROWSER_PLUGIN_EXCEPTIONS_TABLE_MODEL_H_ |
| OLD | NEW |