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

Side by Side Diff: chrome/browser/ui/gtk/hung_renderer_dialog_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/browser_dialogs.h" 5 #include "chrome/browser/ui/browser_dialogs.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if (it->web_contents()->GetRenderProcessHost() == 188 if (it->web_contents()->GetRenderProcessHost() ==
189 hung_contents->GetRenderProcessHost()) { 189 hung_contents->GetRenderProcessHost()) {
190 gtk_list_store_append(model_, &tree_iter); 190 gtk_list_store_append(model_, &tree_iter);
191 std::string title = UTF16ToUTF8(it->web_contents()->GetTitle()); 191 std::string title = UTF16ToUTF8(it->web_contents()->GetTitle());
192 if (title.empty()) 192 if (title.empty())
193 title = UTF16ToUTF8(CoreTabHelper::GetDefaultTitle()); 193 title = UTF16ToUTF8(CoreTabHelper::GetDefaultTitle());
194 SkBitmap favicon = it->favicon_tab_helper()->GetFavicon(); 194 SkBitmap favicon = it->favicon_tab_helper()->GetFavicon();
195 195
196 GdkPixbuf* pixbuf = NULL; 196 GdkPixbuf* pixbuf = NULL;
197 if (favicon.width() > 0) 197 if (favicon.width() > 0)
198 pixbuf = gfx::GdkPixbufFromSkBitmap(&favicon); 198 pixbuf = gfx::GdkPixbufFromSkBitmap(favicon);
199 gtk_list_store_set(model_, &tree_iter, 199 gtk_list_store_set(model_, &tree_iter,
200 COL_FAVICON, pixbuf, 200 COL_FAVICON, pixbuf,
201 COL_TITLE, title.c_str(), 201 COL_TITLE, title.c_str(),
202 -1); 202 -1);
203 if (pixbuf) 203 if (pixbuf)
204 g_object_unref(pixbuf); 204 g_object_unref(pixbuf);
205 } 205 }
206 } 206 }
207 gtk_util::ShowDialog(GTK_WIDGET(dialog_)); 207 gtk_util::ShowDialog(GTK_WIDGET(dialog_));
208 } 208 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 g_instance->ShowForWebContents(contents); 261 g_instance->ShowForWebContents(contents);
262 } 262 }
263 } 263 }
264 264
265 void HideHungRendererDialog(WebContents* contents) { 265 void HideHungRendererDialog(WebContents* contents) {
266 if (!logging::DialogsAreSuppressed() && g_instance) 266 if (!logging::DialogsAreSuppressed() && g_instance)
267 g_instance->EndForWebContents(contents); 267 g_instance->EndForWebContents(contents);
268 } 268 }
269 269
270 } // namespace browser 270 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_tree.cc ('k') | chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698