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

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

Issue 10377122: Convert GdkPixbufFromSkBitmap and GdkPixbufToSkBitmap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/task_manager_gtk.h" 5 #include "chrome/browser/ui/gtk/task_manager_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 715
716 GdkPixbuf* TaskManagerGtk::GetModelIcon(int row) { 716 GdkPixbuf* TaskManagerGtk::GetModelIcon(int row) {
717 SkBitmap icon = model_->GetResourceIcon(row); 717 SkBitmap icon = model_->GetResourceIcon(row);
718 if (icon.pixelRef() == 718 if (icon.pixelRef() ==
719 ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( 719 ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(
720 IDR_DEFAULT_FAVICON)->pixelRef()) { 720 IDR_DEFAULT_FAVICON)->pixelRef()) {
721 return static_cast<GdkPixbuf*>(g_object_ref( 721 return static_cast<GdkPixbuf*>(g_object_ref(
722 GtkThemeService::GetDefaultFavicon(true)->ToGdkPixbuf())); 722 GtkThemeService::GetDefaultFavicon(true)->ToGdkPixbuf()));
723 } 723 }
724 724
725 return gfx::GdkPixbufFromSkBitmap(&icon); 725 return gfx::GdkPixbufFromSkBitmap(icon);
726 } 726 }
727 727
728 void TaskManagerGtk::SetRowDataFromModel(int row, GtkTreeIter* iter) { 728 void TaskManagerGtk::SetRowDataFromModel(int row, GtkTreeIter* iter) {
729 GdkPixbuf* icon = GetModelIcon(row); 729 GdkPixbuf* icon = GetModelIcon(row);
730 std::string task = GetModelText(row, IDS_TASK_MANAGER_TASK_COLUMN); 730 std::string task = GetModelText(row, IDS_TASK_MANAGER_TASK_COLUMN);
731 std::string profile_name = 731 std::string profile_name =
732 GetModelText(row, IDS_TASK_MANAGER_PROFILE_NAME_COLUMN); 732 GetModelText(row, IDS_TASK_MANAGER_PROFILE_NAME_COLUMN);
733 gchar* task_markup = g_markup_escape_text(task.c_str(), task.length()); 733 gchar* task_markup = g_markup_escape_text(task.c_str(), task.length());
734 std::string shared_mem = 734 std::string shared_mem =
735 GetModelText(row, IDS_TASK_MANAGER_SHARED_MEM_COLUMN); 735 GetModelText(row, IDS_TASK_MANAGER_SHARED_MEM_COLUMN);
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 guint keyval, 967 guint keyval,
968 GdkModifierType modifier) { 968 GdkModifierType modifier) {
969 if (keyval == GDK_w && modifier == GDK_CONTROL_MASK) { 969 if (keyval == GDK_w && modifier == GDK_CONTROL_MASK) {
970 // The GTK_RESPONSE_DELETE_EVENT response must be sent before the widget 970 // The GTK_RESPONSE_DELETE_EVENT response must be sent before the widget
971 // is destroyed. The deleted object will receive gtk signals otherwise. 971 // is destroyed. The deleted object will receive gtk signals otherwise.
972 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT); 972 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT);
973 } 973 }
974 974
975 return TRUE; 975 return TRUE;
976 } 976 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc ('k') | content/browser/web_contents/web_drag_source_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698