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

Unified Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.mm

Issue 7981035: Add icon to the panel titlebar on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 9 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/panels/panel_titlebar_view_cocoa.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_window_controller_cocoa.mm
diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
index 167c9058abd1dd3b94900914e6eae57edc0647a7..b6a8b2ce94225bf8b77f1a6237cd1f6043e435f4 100644
--- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
@@ -20,6 +20,7 @@
#import "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
#import "chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h"
#import "chrome/browser/ui/cocoa/menu_controller.h"
+#import "chrome/browser/ui/cocoa/tab_contents/favicon_util.h"
#include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/panels/panel_browser_window_cocoa.h"
#include "chrome/browser/ui/panels/panel_manager.h"
@@ -178,6 +179,12 @@ static BOOL g_reportAnimationStatus = NO;
withNewTitle:newTitle
forWindow:[self window]]);
[titlebar_view_ setTitle:newTitle];
+
+ NSImage* newIcon = mac::FaviconForTabContents(
+ windowShim_->browser()->GetSelectedTabContentsWrapper());
+ [titlebar_view_ setIcon:newIcon];
+
+ [titlebar_view_ updateIconAndTitleLayout];
}
- (void)addFindBar:(FindBarCocoaController*)findBarCocoaController {
« no previous file with comments | « chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698