| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/content_settings/content_setting_bubble_model.h" | 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 } | 503 } |
| 504 } | 504 } |
| 505 | 505 |
| 506 void ContentSettingPluginBubbleModel::OnCustomLinkClicked() { | 506 void ContentSettingPluginBubbleModel::OnCustomLinkClicked() { |
| 507 content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); | 507 content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); |
| 508 // Web contents can be NULL if the tab was closed while the plugins | 508 // Web contents can be NULL if the tab was closed while the plugins |
| 509 // settings bubble is visible. | 509 // settings bubble is visible. |
| 510 if (!web_contents()) | 510 if (!web_contents()) |
| 511 return; | 511 return; |
| 512 #if defined(ENABLE_PLUGINS) | 512 #if defined(ENABLE_PLUGINS) |
| 513 // TODO(bauerb): We should send the identifiers of blocked plug-ins here. | 513 // TODO(bauerb): We should send the identifiers of blocked plugins here. |
| 514 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( | 514 ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins( |
| 515 web_contents(), true, std::string()); | 515 web_contents(), true, std::string()); |
| 516 #endif | 516 #endif |
| 517 set_custom_link_enabled(false); | 517 set_custom_link_enabled(false); |
| 518 TabSpecificContentSettings::FromWebContents(web_contents())-> | 518 TabSpecificContentSettings::FromWebContents(web_contents())-> |
| 519 set_load_plugins_link_enabled(false); | 519 set_load_plugins_link_enabled(false); |
| 520 } | 520 } |
| 521 | 521 |
| 522 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { | 522 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { |
| 523 public: | 523 public: |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) { | 1306 if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) { |
| 1307 DCHECK_EQ(web_contents_, | 1307 DCHECK_EQ(web_contents_, |
| 1308 content::Source<WebContents>(source).ptr()); | 1308 content::Source<WebContents>(source).ptr()); |
| 1309 web_contents_ = NULL; | 1309 web_contents_ = NULL; |
| 1310 } else { | 1310 } else { |
| 1311 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); | 1311 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); |
| 1312 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); | 1312 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); |
| 1313 profile_ = NULL; | 1313 profile_ = NULL; |
| 1314 } | 1314 } |
| 1315 } | 1315 } |
| OLD | NEW |