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

Side by Side Diff: chrome/browser/ui/gtk/browser_titlebar.cc

Issue 9815006: ui/gfx: Remove the deprecated "operator const GdkPixbuf*" from Image API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/gtk/about_chrome_dialog.cc ('k') | chrome/browser/ui/gtk/custom_drag.cc » ('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/gtk/browser_titlebar.h" 5 #include "chrome/browser/ui/gtk/browser_titlebar.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 639 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
640 640
641 // Note: we want to exclude the application popup window. 641 // Note: we want to exclude the application popup window.
642 if ((browser_window_->browser()->is_app() && 642 if ((browser_window_->browser()->is_app() &&
643 browser_window_->browser()->is_type_popup()) || 643 browser_window_->browser()->is_type_popup()) ||
644 IsTypePanel()) { 644 IsTypePanel()) {
645 SkBitmap icon = browser_window_->browser()->GetCurrentPageIcon(); 645 SkBitmap icon = browser_window_->browser()->GetCurrentPageIcon();
646 if (icon.empty()) { 646 if (icon.empty()) {
647 // Fallback to the Chromium icon if the page has no icon. 647 // Fallback to the Chromium icon if the page has no icon.
648 gtk_image_set_from_pixbuf(GTK_IMAGE(app_mode_favicon_), 648 gtk_image_set_from_pixbuf(GTK_IMAGE(app_mode_favicon_),
649 rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_16)); 649 rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_16).ToGdkPixbuf());
650 } else { 650 } else {
651 GdkPixbuf* icon_pixbuf = gfx::GdkPixbufFromSkBitmap(&icon); 651 GdkPixbuf* icon_pixbuf = gfx::GdkPixbufFromSkBitmap(&icon);
652 gtk_image_set_from_pixbuf(GTK_IMAGE(app_mode_favicon_), icon_pixbuf); 652 gtk_image_set_from_pixbuf(GTK_IMAGE(app_mode_favicon_), icon_pixbuf);
653 g_object_unref(icon_pixbuf); 653 g_object_unref(icon_pixbuf);
654 } 654 }
655 } else { 655 } else {
656 gtk_image_set_from_pixbuf(GTK_IMAGE(app_mode_favicon_), 656 gtk_image_set_from_pixbuf(GTK_IMAGE(app_mode_favicon_),
657 rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_16)); 657 rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_16).ToGdkPixbuf());
658 } 658 }
659 throbber_.Reset(); 659 throbber_.Reset();
660 } 660 }
661 } 661 }
662 662
663 void BrowserTitlebar::UpdateTitlebarAlignment() { 663 void BrowserTitlebar::UpdateTitlebarAlignment() {
664 if (browser_window_->browser()->is_type_tabbed()) { 664 if (browser_window_->browser()->is_type_tabbed()) {
665 int top_padding = 0; 665 int top_padding = 0;
666 int side_padding = 0; 666 int side_padding = 0;
667 int vertical_offset = kNormalVerticalOffset; 667 int vertical_offset = kNormalVerticalOffset;
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 ui::SimpleMenuModel::Delegate* delegate) 1160 ui::SimpleMenuModel::Delegate* delegate)
1161 : SimpleMenuModel(delegate) { 1161 : SimpleMenuModel(delegate) {
1162 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); 1162 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB);
1163 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); 1163 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB);
1164 AddSeparator(); 1164 AddSeparator();
1165 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); 1165 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
1166 AddSeparator(); 1166 AddSeparator();
1167 AddCheckItemWithStringId(kShowWindowDecorationsCommand, 1167 AddCheckItemWithStringId(kShowWindowDecorationsCommand,
1168 IDS_SHOW_WINDOW_DECORATIONS_MENU); 1168 IDS_SHOW_WINDOW_DECORATIONS_MENU);
1169 } 1169 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/about_chrome_dialog.cc ('k') | chrome/browser/ui/gtk/custom_drag.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698