Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: chrome/browser/content_setting_image_model.h

Issue 6854035: Move blocked content from TabContents to TabContentsWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_setting_image_model.h
diff --git a/chrome/browser/content_setting_image_model.h b/chrome/browser/content_setting_image_model.h
deleted file mode 100644
index 3e6d5e82a6b70029638056df9be55c6aa87dc16f..0000000000000000000000000000000000000000
--- a/chrome/browser/content_setting_image_model.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// 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_IMAGE_MODEL_H_
-#define CHROME_BROWSER_CONTENT_SETTING_IMAGE_MODEL_H_
-#pragma once
-
-#include <string>
-
-#include "chrome/common/content_settings_types.h"
-
-class TabContents;
-
-// This model provides data (icon ids and tooltip) for the content setting icons
-// that are displayed in the location bar.
-class ContentSettingImageModel {
- public:
- virtual ~ContentSettingImageModel() {}
-
- // Factory function.
- static ContentSettingImageModel* CreateContentSettingImageModel(
- ContentSettingsType content_settings_type);
-
- // Notifies this model that its setting might have changed and it may need to
- // update its visibility, icon and tooltip.
- virtual void UpdateFromTabContents(TabContents* tab_contents) = 0;
-
- ContentSettingsType get_content_settings_type() const {
- return content_settings_type_;
- }
- bool is_visible() const { return is_visible_; }
- int get_icon() const { return icon_; }
- // Returns the resource ID of a string to show when the icon appears, or 0 if
- // we don't wish to show anything.
- int explanatory_string_id() const { return explanatory_string_id_; }
- std::string get_tooltip() const { return tooltip_; }
-
- protected:
- explicit ContentSettingImageModel(ContentSettingsType content_settings_type);
- void set_visible(bool visible) { is_visible_ = visible; }
- void set_icon(int icon) { icon_ = icon; }
- void set_explanatory_string_id(int text_id) {
- explanatory_string_id_ = text_id;
- }
- void set_tooltip(const std::string& tooltip) { tooltip_ = tooltip; }
-
- private:
- const ContentSettingsType content_settings_type_;
- bool is_visible_;
- int icon_;
- int explanatory_string_id_;
- std::string tooltip_;
-};
-
-#endif // CHROME_BROWSER_CONTENT_SETTING_IMAGE_MODEL_H_

Powered by Google App Engine
This is Rietveld 408576698