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