summaryrefslogtreecommitdiffstats
path: root/chrome/browser/content_setting_combo_model.h
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 22:06:27 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 22:06:27 +0000
commit77767745f94bb6e2ae267260de97af697fd2af82 (patch)
treefa18692d1ce6a175bb4ce5c7b9481c5c4f87750e /chrome/browser/content_setting_combo_model.h
parent9d166afe522da91217060a34787b16fa705f15e3 (diff)
downloadchromium_src-77767745f94bb6e2ae267260de97af697fd2af82.zip
chromium_src-77767745f94bb6e2ae267260de97af697fd2af82.tar.gz
chromium_src-77767745f94bb6e2ae267260de97af697fd2af82.tar.bz2
Moves ActionComboboxModel class to its own header so we can share common code between windows and linux.
BUG=None TEST=compiles, and still works as before. Review URL: http://codereview.chromium.org/661225 Patch from thiago.farina@gmail.com. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_setting_combo_model.h')
-rw-r--r--chrome/browser/content_setting_combo_model.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/chrome/browser/content_setting_combo_model.h b/chrome/browser/content_setting_combo_model.h
new file mode 100644
index 0000000..751e9d0
--- /dev/null
+++ b/chrome/browser/content_setting_combo_model.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CONTENT_SETTING_COMBO_MODEL_H_
+#define CHROME_BROWSER_CONTENT_SETTING_COMBO_MODEL_H_
+
+#include "app/combobox_model.h"
+
+#include "base/basictypes.h"
+#include "chrome/common/content_settings.h"
+
+class ContentSettingComboModel : public ComboboxModel {
+ public:
+ explicit ContentSettingComboModel(bool show_ask);
+ virtual ~ContentSettingComboModel();
+
+ virtual int GetItemCount();
+
+ virtual std::wstring GetItemAt(int index);
+
+ ContentSetting SettingForIndex(int index);
+
+ int IndexForSetting(ContentSetting);
+
+ private:
+ const bool show_ask_;
+
+ DISALLOW_COPY_AND_ASSIGN(ContentSettingComboModel);
+};
+
+#endif // CHROME_BROWSER_CONTENT_SETTING_COMBO_MODEL_H_