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

Unified Diff: chrome/browser/ui/panels/old_panel.cc

Issue 10827259: Change panels to use gfx::Image instead of SkBitmap for favicon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: applied change to panel_titlebar_gtk.cc after syncing 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/panels/old_panel.h ('k') | chrome/browser/ui/panels/panel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/old_panel.cc
diff --git a/chrome/browser/ui/panels/old_panel.cc b/chrome/browser/ui/panels/old_panel.cc
index 53e9db813b1d92216e1355eed91a68585f1ae10e..a488cdd68e07c5546be272b775518fa84a6d136a 100644
--- a/chrome/browser/ui/panels/old_panel.cc
+++ b/chrome/browser/ui/panels/old_panel.cc
@@ -4,12 +4,15 @@
#include "chrome/browser/ui/panels/old_panel.h"
+#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_command_controller.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/panels/panel_browser_window.h"
-#include "third_party/skia/include/core/SkBitmap.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
+#include "ui/gfx/image/image.h"
OldPanel::OldPanel(Browser* browser,
const gfx::Size& min_size, const gfx::Size& max_size)
@@ -58,6 +61,9 @@ void OldPanel::ExecuteCommandWithDisposition(
chrome::ExecuteCommandWithDisposition(browser_, id, disposition);
}
-SkBitmap OldPanel::GetCurrentPageIcon() const {
- return browser_->GetCurrentPageIcon();
+gfx::Image OldPanel::GetCurrentPageIcon() const {
+ // Browser has not been changed to return SkBitmap yet so we get the favicon
+ // directly rather than use browser_->GetCurrentPageIcon().
+ TabContents* contents = chrome::GetActiveTabContents(browser_);
+ return contents ? contents->favicon_tab_helper()->GetFavicon() : gfx::Image();
}
« no previous file with comments | « chrome/browser/ui/panels/old_panel.h ('k') | chrome/browser/ui/panels/panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698