diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-01 16:17:37 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-01 16:17:37 +0000 |
commit | 508d27e151318b0a2ffdc6a4089ea3613462c26d (patch) | |
tree | 0aadf1f0948c5086a624e37f95bc966fa4bb8633 /chrome/browser/geolocation/geolocation_exceptions_table_model.h | |
parent | bf784d4ca187ca12d455e91ae7c0d2e0380a3154 (diff) | |
download | chromium_src-508d27e151318b0a2ffdc6a4089ea3613462c26d.zip chromium_src-508d27e151318b0a2ffdc6a4089ea3613462c26d.tar.gz chromium_src-508d27e151318b0a2ffdc6a4089ea3613462c26d.tar.bz2 |
Introduce RemoveRowTableModel interface, let GeolocationExceptionsTableModel derive from it.
No functionality change.
This will be used to share the content settings exceptions dialog code between geolocation and notifications.
BUG=45547
Review URL: http://codereview.chromium.org/2838037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/geolocation_exceptions_table_model.h')
-rw-r--r-- | chrome/browser/geolocation/geolocation_exceptions_table_model.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/geolocation/geolocation_exceptions_table_model.h b/chrome/browser/geolocation/geolocation_exceptions_table_model.h index 6328166..c458c0e 100644 --- a/chrome/browser/geolocation/geolocation_exceptions_table_model.h +++ b/chrome/browser/geolocation/geolocation_exceptions_table_model.h @@ -8,32 +8,32 @@ #include <set> #include <vector> -#include "app/table_model.h" #include "chrome/browser/geolocation/geolocation_content_settings_map.h" +#include "chrome/browser/remove_rows_table_model.h" #include "chrome/common/content_settings.h" #include "chrome/common/content_settings_types.h" -class GeolocationExceptionsTableModel : public TableModel { +class GeolocationExceptionsTableModel : public RemoveRowsTableModel { public: - typedef std::set<size_t> Rows; - explicit GeolocationExceptionsTableModel( GeolocationContentSettingsMap* map); + // RemoveRowsTableModel overrides: + // Return whether the given set of rows can be removed. A parent with setting // of CONTENT_SETTING_DEFAULT can't be removed unless all its children are // also being removed. - bool CanRemoveExceptions(const Rows& rows) const; + virtual bool CanRemoveRows(const Rows& rows) const; // Removes the exceptions at the specified indexes. If an exception is a // parent, and it has children, the row in model will be updated to have // CONTENT_SETTING_DEFAULT. If it is the only child of a // CONTENT_SETTING_DEFAULT parent, the parent will be removed from the model // too. - void RemoveExceptions(const Rows& rows); + virtual void RemoveRows(const Rows& rows); // Removes all the exceptions from both the map and model. - void RemoveAll(); + virtual void RemoveAll(); // TableModel overrides: virtual int RowCount(); |