From 77767745f94bb6e2ae267260de97af697fd2af82 Mon Sep 17 00:00:00 2001 From: "erg@chromium.org" Date: Tue, 2 Mar 2010 22:06:27 +0000 Subject: 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 --- chrome/browser/content_setting_combo_model.h | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 chrome/browser/content_setting_combo_model.h (limited to 'chrome/browser/content_setting_combo_model.h') 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_ -- cgit v1.1