Home | History | Annotate | Download | only in browser
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_REMOVE_ROWS_TABLE_MODEL_H_
      6 #define CHROME_BROWSER_REMOVE_ROWS_TABLE_MODEL_H_
      7 #pragma once
      8 
      9 #include <set>
     10 
     11 #include "ui/base/models/table_model.h"
     12 
     13 // A table model that also supports removing rows. Used for example for the
     14 // content settings exception dialog for geolocation.
     15 class RemoveRowsTableModel : public ui::TableModel {
     16  public:
     17   typedef std::set<size_t> Rows;
     18 
     19   // Returns whether or not the rows can be removed.
     20   virtual bool CanRemoveRows(const Rows& rows) const = 0;
     21 
     22   // Remove the rows from the table.
     23   virtual void RemoveRows(const Rows& rows) = 0;
     24 
     25   // Removes all the rows.
     26   virtual void RemoveAll() = 0;
     27 };
     28 
     29 #endif  // CHROME_BROWSER_REMOVE_ROWS_TABLE_MODEL_H_
     30 
     31