| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 load_plugins_link_enabled()); | 347 load_plugins_link_enabled()); |
| 348 } | 348 } |
| 349 | 349 |
| 350 virtual ~ContentSettingPluginBubbleModel() {} | 350 virtual ~ContentSettingPluginBubbleModel() {} |
| 351 | 351 |
| 352 private: | 352 private: |
| 353 virtual void OnCustomLinkClicked() OVERRIDE { | 353 virtual void OnCustomLinkClicked() OVERRIDE { |
| 354 UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); | 354 UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); |
| 355 DCHECK(tab_contents()); | 355 DCHECK(tab_contents()); |
| 356 RenderViewHost* host = tab_contents()->render_view_host(); | 356 RenderViewHost* host = tab_contents()->render_view_host(); |
| 357 host->Send(new ViewMsg_LoadBlockedPlugins(host->routing_id())); | 357 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->routing_id())); |
| 358 set_custom_link_enabled(false); | 358 set_custom_link_enabled(false); |
| 359 tab_contents()->content_settings()->set_load_plugins_link_enabled(false); | 359 tab_contents()->content_settings()->set_load_plugins_link_enabled(false); |
| 360 } | 360 } |
| 361 }; | 361 }; |
| 362 | 362 |
| 363 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { | 363 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { |
| 364 public: | 364 public: |
| 365 ContentSettingPopupBubbleModel(Browser* browser, | 365 ContentSettingPopupBubbleModel(Browser* browser, |
| 366 TabContentsWrapper* tab_contents, | 366 TabContentsWrapper* tab_contents, |
| 367 Profile* profile, | 367 Profile* profile, |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 tab_contents_ = NULL; | 549 tab_contents_ = NULL; |
| 550 break; | 550 break; |
| 551 case chrome::NOTIFICATION_PROFILE_DESTROYED: | 551 case chrome::NOTIFICATION_PROFILE_DESTROYED: |
| 552 DCHECK(source == Source<Profile>(profile_)); | 552 DCHECK(source == Source<Profile>(profile_)); |
| 553 profile_ = NULL; | 553 profile_ = NULL; |
| 554 break; | 554 break; |
| 555 default: | 555 default: |
| 556 NOTREACHED(); | 556 NOTREACHED(); |
| 557 } | 557 } |
| 558 } | 558 } |
| OLD | NEW |