| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/content_setting_bubble_model.h" | 5 #include "chrome/browser/content_setting_bubble_model.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/blocked_content_container.h" | 9 #include "chrome/browser/blocked_content_container.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 11 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 11 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| 12 #include "chrome/browser/metrics/user_metrics.h" | 12 #include "chrome/browser/metrics/user_metrics.h" |
| 13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/renderer_host/render_view_host.h" | |
| 16 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 17 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | |
| 18 #include "chrome/browser/tab_contents/tab_specific_content_settings.h" | 15 #include "chrome/browser/tab_contents/tab_specific_content_settings.h" |
| 19 #include "chrome/common/notification_service.h" | 16 #include "chrome/common/notification_service.h" |
| 20 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "content/browser/renderer_host/render_view_host.h" |
| 19 #include "content/browser/tab_contents/tab_contents.h" |
| 20 #include "content/browser/tab_contents/tab_contents_delegate.h" |
| 21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 22 #include "net/base/net_util.h" | 22 #include "net/base/net_util.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
| 24 | 24 |
| 25 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { | 25 class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel { |
| 26 public: | 26 public: |
| 27 ContentSettingTitleAndLinkModel(TabContents* tab_contents, | 27 ContentSettingTitleAndLinkModel(TabContents* tab_contents, |
| 28 Profile* profile, | 28 Profile* profile, |
| 29 ContentSettingsType content_type) | 29 ContentSettingsType content_type) |
| 30 : ContentSettingBubbleModel(tab_contents, profile, content_type) { | 30 : ContentSettingBubbleModel(tab_contents, profile, content_type) { |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 bubble_content_.resource_identifiers.insert(resource_identifier); | 525 bubble_content_.resource_identifiers.insert(resource_identifier); |
| 526 } | 526 } |
| 527 | 527 |
| 528 void ContentSettingBubbleModel::Observe(NotificationType type, | 528 void ContentSettingBubbleModel::Observe(NotificationType type, |
| 529 const NotificationSource& source, | 529 const NotificationSource& source, |
| 530 const NotificationDetails& details) { | 530 const NotificationDetails& details) { |
| 531 DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED); | 531 DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED); |
| 532 DCHECK(source == Source<TabContents>(tab_contents_)); | 532 DCHECK(source == Source<TabContents>(tab_contents_)); |
| 533 tab_contents_ = NULL; | 533 tab_contents_ = NULL; |
| 534 } | 534 } |
| OLD | NEW |