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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/panels/old_panel.h" 5 #include "chrome/browser/ui/panels/old_panel.h"
6 6
7 #include "chrome/browser/favicon/favicon_tab_helper.h"
7 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_command_controller.h" 9 #include "chrome/browser/ui/browser_command_controller.h"
9 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 11 #include "chrome/browser/ui/browser_tabstrip.h"
11 #include "chrome/browser/ui/panels/panel_browser_window.h" 12 #include "chrome/browser/ui/panels/panel_browser_window.h"
12 #include "third_party/skia/include/core/SkBitmap.h" 13 #include "chrome/browser/ui/browser_tabstrip.h"
14 #include "chrome/browser/ui/tab_contents/tab_contents.h"
15 #include "ui/gfx/image/image.h"
13 16
14 OldPanel::OldPanel(Browser* browser, 17 OldPanel::OldPanel(Browser* browser,
15 const gfx::Size& min_size, const gfx::Size& max_size) 18 const gfx::Size& min_size, const gfx::Size& max_size)
16 : Panel(browser->app_name(), min_size, max_size), 19 : Panel(browser->app_name(), min_size, max_size),
17 browser_(browser) { 20 browser_(browser) {
18 } 21 }
19 22
20 OldPanel::~OldPanel() {} 23 OldPanel::~OldPanel() {}
21 24
22 Browser* OldPanel::browser() const { 25 Browser* OldPanel::browser() const {
(...skipping 28 matching lines...) Expand all
51 54
52 void OldPanel::OnWindowClosing() { 55 void OldPanel::OnWindowClosing() {
53 browser_->OnWindowClosing(); 56 browser_->OnWindowClosing();
54 } 57 }
55 58
56 void OldPanel::ExecuteCommandWithDisposition( 59 void OldPanel::ExecuteCommandWithDisposition(
57 int id, WindowOpenDisposition disposition) { 60 int id, WindowOpenDisposition disposition) {
58 chrome::ExecuteCommandWithDisposition(browser_, id, disposition); 61 chrome::ExecuteCommandWithDisposition(browser_, id, disposition);
59 } 62 }
60 63
61 SkBitmap OldPanel::GetCurrentPageIcon() const { 64 gfx::Image OldPanel::GetCurrentPageIcon() const {
62 return browser_->GetCurrentPageIcon(); 65 // Browser has not been changed to return SkBitmap yet so we get the favicon
66 // directly rather than use browser_->GetCurrentPageIcon().
67 TabContents* contents = chrome::GetActiveTabContents(browser_);
68 return contents ? contents->favicon_tab_helper()->GetFavicon() : gfx::Image();
63 } 69 }
OLDNEW
« 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