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

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

Issue 10837090: Change return type of FaviconTabHelper::GetFavicon() to gfx::Image. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 GetBlockedContents(&blocked_contents); 461 GetBlockedContents(&blocked_contents);
462 for (std::vector<TabContents*>::const_iterator 462 for (std::vector<TabContents*>::const_iterator
463 i = blocked_contents.begin(); i != blocked_contents.end(); ++i) { 463 i = blocked_contents.begin(); i != blocked_contents.end(); ++i) {
464 std::string title(UTF16ToUTF8((*i)->web_contents()->GetTitle())); 464 std::string title(UTF16ToUTF8((*i)->web_contents()->GetTitle()));
465 // The popup may not have committed a load yet, in which case it won't 465 // The popup may not have committed a load yet, in which case it won't
466 // have a URL or title. 466 // have a URL or title.
467 if (title.empty()) 467 if (title.empty())
468 title = l10n_util::GetStringUTF8(IDS_TAB_LOADING_TITLE); 468 title = l10n_util::GetStringUTF8(IDS_TAB_LOADING_TITLE);
469 PopupItem popup_item; 469 PopupItem popup_item;
470 popup_item.title = title; 470 popup_item.title = title;
471 popup_item.bitmap = (*i)->favicon_tab_helper()->GetFavicon(); 471 // TODO: Make this use gfx::Image.
472 popup_item.bitmap = (*i)->favicon_tab_helper()->GetFavicon().AsBitmap();
472 popup_item.tab_contents = (*i); 473 popup_item.tab_contents = (*i);
473 add_popup(popup_item); 474 add_popup(popup_item);
474 } 475 }
475 } 476 }
476 477
477 void ContentSettingPopupBubbleModel::OnPopupClicked(int index) { 478 void ContentSettingPopupBubbleModel::OnPopupClicked(int index) {
478 if (tab_contents()) { 479 if (tab_contents()) {
479 tab_contents()->blocked_content_tab_helper()-> 480 tab_contents()->blocked_content_tab_helper()->
480 LaunchForContents(bubble_content().popup_items[index].tab_contents); 481 LaunchForContents(bubble_content().popup_items[index].tab_contents);
481 } 482 }
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 const content::NotificationDetails& details) { 814 const content::NotificationDetails& details) {
814 if (type == chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED) { 815 if (type == chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED) {
815 DCHECK_EQ(tab_contents_, content::Source<TabContents>(source).ptr()); 816 DCHECK_EQ(tab_contents_, content::Source<TabContents>(source).ptr());
816 tab_contents_ = NULL; 817 tab_contents_ = NULL;
817 } else { 818 } else {
818 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); 819 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type);
819 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr()); 820 DCHECK_EQ(profile_, content::Source<Profile>(source).ptr());
820 profile_ = NULL; 821 profile_ = NULL;
821 } 822 }
822 } 823 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm ('k') | chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698