| 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/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/content_settings/content_settings_utils.h" | 8 #include "chrome/browser/content_settings/content_settings_utils.h" |
| 9 #include "chrome/browser/content_settings/cookie_settings.h" | 9 #include "chrome/browser/content_settings/cookie_settings.h" |
| 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 set_custom_link_enabled(tab_contents && tab_contents->content_settings()-> | 376 set_custom_link_enabled(tab_contents && tab_contents->content_settings()-> |
| 377 load_plugins_link_enabled()); | 377 load_plugins_link_enabled()); |
| 378 } | 378 } |
| 379 | 379 |
| 380 virtual ~ContentSettingPluginBubbleModel() {} | 380 virtual ~ContentSettingPluginBubbleModel() {} |
| 381 | 381 |
| 382 private: | 382 private: |
| 383 virtual void OnCustomLinkClicked() OVERRIDE { | 383 virtual void OnCustomLinkClicked() OVERRIDE { |
| 384 content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); | 384 content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); |
| 385 DCHECK(tab_contents()); | 385 DCHECK(tab_contents()); |
| 386 RenderViewHost* host = tab_contents()->web_contents()->GetRenderViewHost(); | 386 content::RenderViewHost* host = |
| 387 tab_contents()->web_contents()->GetRenderViewHost(); |
| 387 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->GetRoutingID())); | 388 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->GetRoutingID())); |
| 388 set_custom_link_enabled(false); | 389 set_custom_link_enabled(false); |
| 389 tab_contents()->content_settings()->set_load_plugins_link_enabled(false); | 390 tab_contents()->content_settings()->set_load_plugins_link_enabled(false); |
| 390 } | 391 } |
| 391 }; | 392 }; |
| 392 | 393 |
| 393 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { | 394 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { |
| 394 public: | 395 public: |
| 395 ContentSettingPopupBubbleModel(Browser* browser, | 396 ContentSettingPopupBubbleModel(Browser* browser, |
| 396 TabContentsWrapper* tab_contents, | 397 TabContentsWrapper* tab_contents, |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 tab_contents_ = NULL; | 583 tab_contents_ = NULL; |
| 583 break; | 584 break; |
| 584 case chrome::NOTIFICATION_PROFILE_DESTROYED: | 585 case chrome::NOTIFICATION_PROFILE_DESTROYED: |
| 585 DCHECK(source == content::Source<Profile>(profile_)); | 586 DCHECK(source == content::Source<Profile>(profile_)); |
| 586 profile_ = NULL; | 587 profile_ = NULL; |
| 587 break; | 588 break; |
| 588 default: | 589 default: |
| 589 NOTREACHED(); | 590 NOTREACHED(); |
| 590 } | 591 } |
| 591 } | 592 } |
| OLD | NEW |