| OLD | NEW |
| 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 case IDS_TASK_MANAGER_GOATS_TELEPORTED_COLUMN: // Goats Teleported! | 725 case IDS_TASK_MANAGER_GOATS_TELEPORTED_COLUMN: // Goats Teleported! |
| 726 return UTF16ToUTF8(model_->GetResourceGoatsTeleported(row)); | 726 return UTF16ToUTF8(model_->GetResourceGoatsTeleported(row)); |
| 727 | 727 |
| 728 default: | 728 default: |
| 729 NOTREACHED(); | 729 NOTREACHED(); |
| 730 return std::string(); | 730 return std::string(); |
| 731 } | 731 } |
| 732 } | 732 } |
| 733 | 733 |
| 734 GdkPixbuf* TaskManagerGtk::GetModelIcon(int row) { | 734 GdkPixbuf* TaskManagerGtk::GetModelIcon(int row) { |
| 735 SkBitmap icon = model_->GetResourceIcon(row); | 735 SkBitmap icon = *model_->GetResourceIcon(row).bitmap(); |
| 736 if (icon.pixelRef() == | 736 if (icon.pixelRef() == |
| 737 ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( | 737 ui::ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| 738 IDR_DEFAULT_FAVICON)->pixelRef()) { | 738 IDR_DEFAULT_FAVICON)->pixelRef()) { |
| 739 return static_cast<GdkPixbuf*>(g_object_ref( | 739 return static_cast<GdkPixbuf*>(g_object_ref( |
| 740 GtkThemeService::GetDefaultFavicon(true).ToGdkPixbuf())); | 740 GtkThemeService::GetDefaultFavicon(true).ToGdkPixbuf())); |
| 741 } | 741 } |
| 742 | 742 |
| 743 return gfx::GdkPixbufFromSkBitmap(icon); | 743 return gfx::GdkPixbufFromSkBitmap(icon); |
| 744 } | 744 } |
| 745 | 745 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 guint keyval, | 1016 guint keyval, |
| 1017 GdkModifierType modifier) { | 1017 GdkModifierType modifier) { |
| 1018 if (keyval == GDK_w && modifier == GDK_CONTROL_MASK) { | 1018 if (keyval == GDK_w && modifier == GDK_CONTROL_MASK) { |
| 1019 // The GTK_RESPONSE_DELETE_EVENT response must be sent before the widget | 1019 // The GTK_RESPONSE_DELETE_EVENT response must be sent before the widget |
| 1020 // is destroyed. The deleted object will receive gtk signals otherwise. | 1020 // is destroyed. The deleted object will receive gtk signals otherwise. |
| 1021 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT); | 1021 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT); |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 return TRUE; | 1024 return TRUE; |
| 1025 } | 1025 } |
| OLD | NEW |