| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 RenderViewHost* host = tab_contents()->web_contents()->GetRenderViewHost(); |
| 387 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->routing_id())); | 387 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->GetRoutingID())); |
| 388 set_custom_link_enabled(false); | 388 set_custom_link_enabled(false); |
| 389 tab_contents()->content_settings()->set_load_plugins_link_enabled(false); | 389 tab_contents()->content_settings()->set_load_plugins_link_enabled(false); |
| 390 } | 390 } |
| 391 }; | 391 }; |
| 392 | 392 |
| 393 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { | 393 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { |
| 394 public: | 394 public: |
| 395 ContentSettingPopupBubbleModel(Browser* browser, | 395 ContentSettingPopupBubbleModel(Browser* browser, |
| 396 TabContentsWrapper* tab_contents, | 396 TabContentsWrapper* tab_contents, |
| 397 Profile* profile, | 397 Profile* profile, |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 tab_contents_ = NULL; | 582 tab_contents_ = NULL; |
| 583 break; | 583 break; |
| 584 case chrome::NOTIFICATION_PROFILE_DESTROYED: | 584 case chrome::NOTIFICATION_PROFILE_DESTROYED: |
| 585 DCHECK(source == content::Source<Profile>(profile_)); | 585 DCHECK(source == content::Source<Profile>(profile_)); |
| 586 profile_ = NULL; | 586 profile_ = NULL; |
| 587 break; | 587 break; |
| 588 default: | 588 default: |
| 589 NOTREACHED(); | 589 NOTREACHED(); |
| 590 } | 590 } |
| 591 } | 591 } |
| OLD | NEW |