Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 set_custom_link_enabled(tab_contents && tab_contents->content_settings()-> 372 set_custom_link_enabled(tab_contents && tab_contents->content_settings()->
373 load_plugins_link_enabled()); 373 load_plugins_link_enabled());
374 } 374 }
375 375
376 virtual ~ContentSettingPluginBubbleModel() {} 376 virtual ~ContentSettingPluginBubbleModel() {}
377 377
378 private: 378 private:
379 virtual void OnCustomLinkClicked() OVERRIDE { 379 virtual void OnCustomLinkClicked() OVERRIDE {
380 UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble")); 380 UserMetrics::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble"));
381 DCHECK(tab_contents()); 381 DCHECK(tab_contents());
382 RenderViewHost* host = tab_contents()->render_view_host(); 382 RenderViewHost* host = tab_contents()->tab_contents()->render_view_host();
383 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->routing_id())); 383 host->Send(new ChromeViewMsg_LoadBlockedPlugins(host->routing_id()));
384 set_custom_link_enabled(false); 384 set_custom_link_enabled(false);
385 tab_contents()->content_settings()->set_load_plugins_link_enabled(false); 385 tab_contents()->content_settings()->set_load_plugins_link_enabled(false);
386 } 386 }
387 }; 387 };
388 388
389 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup { 389 class ContentSettingPopupBubbleModel : public ContentSettingSingleRadioGroup {
390 public: 390 public:
391 ContentSettingPopupBubbleModel(Browser* browser, 391 ContentSettingPopupBubbleModel(Browser* browser,
392 TabContentsWrapper* tab_contents, 392 TabContentsWrapper* tab_contents,
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 tab_contents_ = NULL; 577 tab_contents_ = NULL;
578 break; 578 break;
579 case chrome::NOTIFICATION_PROFILE_DESTROYED: 579 case chrome::NOTIFICATION_PROFILE_DESTROYED:
580 DCHECK(source == content::Source<Profile>(profile_)); 580 DCHECK(source == content::Source<Profile>(profile_));
581 profile_ = NULL; 581 profile_ = NULL;
582 break; 582 break;
583 default: 583 default:
584 NOTREACHED(); 584 NOTREACHED();
585 } 585 }
586 } 586 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/constrained_window_tab_helper.cc ('k') | chrome/browser/ui/find_bar/find_bar_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698