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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 10938033: Switch BlockedContentTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_tabstrip.cc ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index b3cce9f507a566dc3650bb31a3ceeae632527dfa..61ef98e216ae52c868141e14e555330648705e55 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -456,12 +456,12 @@ ContentSettingPopupBubbleModel::ContentSettingPopupBubbleModel(
void ContentSettingPopupBubbleModel::SetPopups() {
- std::vector<TabContents*> blocked_contents;
- tab_contents()->blocked_content_tab_helper()->
+ std::vector<content::WebContents*> blocked_contents;
+ BlockedContentTabHelper::FromWebContents(tab_contents()->web_contents())->
GetBlockedContents(&blocked_contents);
- for (std::vector<TabContents*>::const_iterator
+ for (std::vector<content::WebContents*>::const_iterator
i = blocked_contents.begin(); i != blocked_contents.end(); ++i) {
- std::string title(UTF16ToUTF8((*i)->web_contents()->GetTitle()));
+ std::string title(UTF16ToUTF8((*i)->GetTitle()));
// The popup may not have committed a load yet, in which case it won't
// have a URL or title.
if (title.empty())
@@ -469,16 +469,19 @@ void ContentSettingPopupBubbleModel::SetPopups() {
PopupItem popup_item;
popup_item.title = title;
// TODO: Make this use gfx::Image.
- popup_item.bitmap = (*i)->favicon_tab_helper()->GetFavicon().AsBitmap();
- popup_item.tab_contents = (*i);
+ TabContents* tab_contents = TabContents::FromWebContents(*i);
+ popup_item.bitmap =
+ tab_contents->favicon_tab_helper()->GetFavicon().AsBitmap();
+ popup_item.tab_contents = tab_contents;
add_popup(popup_item);
}
}
void ContentSettingPopupBubbleModel::OnPopupClicked(int index) {
if (tab_contents()) {
- tab_contents()->blocked_content_tab_helper()->
- LaunchForContents(bubble_content().popup_items[index].tab_contents);
+ BlockedContentTabHelper::FromWebContents(tab_contents()->web_contents())->
+ LaunchForContents(
+ bubble_content().popup_items[index].tab_contents->web_contents());
}
}
« no previous file with comments | « chrome/browser/ui/browser_tabstrip.cc ('k') | chrome/browser/ui/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698