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

Side by Side Diff: chrome/browser/ui/gtk/download/download_shelf_gtk.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
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/download/download_shelf_gtk.h" 5 #include "chrome/browser/ui/gtk/download/download_shelf_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/download/download_item_model.h" 10 #include "chrome/browser/download/download_item_model.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 g_signal_connect(link_button_, "clicked", 128 g_signal_connect(link_button_, "clicked",
129 G_CALLBACK(OnButtonClickThunk), this); 129 G_CALLBACK(OnButtonClickThunk), this);
130 gtk_util::SetButtonTriggersNavigation(link_button_); 130 gtk_util::SetButtonTriggersNavigation(link_button_);
131 // Until we switch to vector graphics, force the font size. 131 // Until we switch to vector graphics, force the font size.
132 // 13.4px == 10pt @ 96dpi 132 // 13.4px == 10pt @ 96dpi
133 gtk_util::ForceFontSizePixels(GTK_CHROME_LINK_BUTTON(link_button_)->label, 133 gtk_util::ForceFontSizePixels(GTK_CHROME_LINK_BUTTON(link_button_)->label,
134 13.4); 134 13.4);
135 135
136 // Make the download arrow icon. 136 // Make the download arrow icon.
137 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 137 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
138 GdkPixbuf* download_pixbuf = rb.GetNativeImageNamed(IDR_DOWNLOADS_FAVICON); 138 GtkWidget* download_image = gtk_image_new_from_pixbuf(
139 GtkWidget* download_image = gtk_image_new_from_pixbuf(download_pixbuf); 139 rb.GetNativeImageNamed(IDR_DOWNLOADS_FAVICON).ToGdkPixbuf());
140 140
141 // Pack the link and the icon in outer hbox. 141 // Pack the link and the icon in outer hbox.
142 gtk_util::CenterWidgetInHBox(outer_hbox, link_button_, true, 0); 142 gtk_util::CenterWidgetInHBox(outer_hbox, link_button_, true, 0);
143 gtk_util::CenterWidgetInHBox(outer_hbox, download_image, true, 0); 143 gtk_util::CenterWidgetInHBox(outer_hbox, download_image, true, 0);
144 144
145 slide_widget_.reset(new SlideAnimatorGtk(shelf_.get(), 145 slide_widget_.reset(new SlideAnimatorGtk(shelf_.get(),
146 SlideAnimatorGtk::UP, 146 SlideAnimatorGtk::UP,
147 kShelfAnimationDurationMs, 147 kShelfAnimationDurationMs,
148 false, true, this)); 148 false, true, this));
149 149
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 MessageLoop::current()->PostDelayedTask( 388 MessageLoop::current()->PostDelayedTask(
389 FROM_HERE, 389 FROM_HERE,
390 base::Bind(&DownloadShelfGtk::Close, weak_factory_.GetWeakPtr()), 390 base::Bind(&DownloadShelfGtk::Close, weak_factory_.GetWeakPtr()),
391 base::TimeDelta::FromMilliseconds(kAutoCloseDelayMs)); 391 base::TimeDelta::FromMilliseconds(kAutoCloseDelayMs));
392 } 392 }
393 393
394 void DownloadShelfGtk::MouseEnteredShelf() { 394 void DownloadShelfGtk::MouseEnteredShelf() {
395 weak_factory_.InvalidateWeakPtrs(); 395 weak_factory_.InvalidateWeakPtrs();
396 } 396 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/download/download_item_gtk.cc ('k') | chrome/browser/ui/gtk/download/download_started_animation_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698