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

Unified Diff: chrome/browser/ui/content_settings/content_setting_image_model.cc

Issue 12092045: Revert 179093 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1397/src/
Patch Set: Created 7 years, 11 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/ui/content_settings/content_setting_image_model.cc
===================================================================
--- chrome/browser/ui/content_settings/content_setting_image_model.cc (revision 179367)
+++ chrome/browser/ui/content_settings/content_setting_image_model.cc (working copy)
@@ -30,14 +30,6 @@
virtual void UpdateFromWebContents(WebContents* web_contents) OVERRIDE;
};
-// Image model for displaying media icons in the location bar.
-class ContentSettingMediaImageModel : public ContentSettingImageModel {
- public:
- ContentSettingMediaImageModel();
-
- virtual void UpdateFromWebContents(WebContents* web_contents) OVERRIDE;
-};
-
class ContentSettingRPHImageModel : public ContentSettingImageModel {
public:
ContentSettingRPHImageModel();
@@ -174,34 +166,6 @@
IDS_GEOLOCATION_ALLOWED_TOOLTIP : IDS_GEOLOCATION_BLOCKED_TOOLTIP));
}
-ContentSettingMediaImageModel::ContentSettingMediaImageModel()
- : ContentSettingImageModel(CONTENT_SETTINGS_TYPE_MEDIASTREAM) {
-}
-
-void ContentSettingMediaImageModel::UpdateFromWebContents(
- WebContents* web_contents) {
- set_visible(false);
- if (!web_contents)
- return;
-
- TabSpecificContentSettings* content_settings =
- TabSpecificContentSettings::FromWebContents(web_contents);
- if (!content_settings)
- return;
-
- bool blocked =
- content_settings->IsContentBlocked(CONTENT_SETTINGS_TYPE_MEDIASTREAM);
- if (!blocked &&
- !content_settings->IsContentAccessed(get_content_settings_type()))
- return;
-
- set_tooltip(
- l10n_util::GetStringUTF8(blocked ?
- IDS_MEDIASTREAM_BLOCKED_TOOLTIP : IDS_MEDIASTREAM_ALLOWED_TOOLTIP));
- set_icon(blocked ? IDR_BLOCKED_MEDIA : IDR_ASK_MEDIA);
- set_visible(true);
-}
-
ContentSettingRPHImageModel::ContentSettingRPHImageModel()
: ContentSettingImageModel(
CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS) {
@@ -254,8 +218,6 @@
return new ContentSettingNotificationsImageModel();
case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS:
return new ContentSettingRPHImageModel();
- case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
- return new ContentSettingMediaImageModel();
default:
return new ContentSettingBlockedImageModel(content_settings_type);
}
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model.cc ('k') | chrome/browser/ui/media_stream_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698