• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_CONTENT_SETTING_COMBO_MODEL_H_
6 #define CHROME_BROWSER_CONTENT_SETTING_COMBO_MODEL_H_
7 #pragma once
8 
9 #include "base/basictypes.h"
10 #include "base/string16.h"
11 #include "chrome/common/content_settings.h"
12 #include "ui/base/models/combobox_model.h"
13 
14 class ContentSettingComboModel : public ui::ComboboxModel {
15  public:
16   explicit ContentSettingComboModel(ContentSettingsType content_type);
17   virtual ~ContentSettingComboModel();
18 
19   virtual int GetItemCount();
20   virtual string16 GetItemAt(int index);
21 
22   ContentSetting SettingForIndex(int index);
23 
24   int IndexForSetting(ContentSetting);
25 
26  private:
27   const ContentSettingsType content_type_;
28 
29   DISALLOW_COPY_AND_ASSIGN(ContentSettingComboModel);
30 };
31 
32 #endif  // CHROME_BROWSER_CONTENT_SETTING_COMBO_MODEL_H_
33