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

Side by Side Diff: chrome/browser/speech/speech_recognition_bubble_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
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service_gtk.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/speech/speech_recognition_bubble.h" 5 #include "chrome/browser/speech/speech_recognition_bubble.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" 10 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 gtk_widget_show(cancel_button_); 271 gtk_widget_show(cancel_button_);
272 } 272 }
273 } 273 }
274 } 274 }
275 275
276 void SpeechRecognitionBubbleGtk::UpdateImage() { 276 void SpeechRecognitionBubbleGtk::UpdateImage() {
277 SkBitmap image = icon_image(); 277 SkBitmap image = icon_image();
278 if (image.isNull() || !bubble_) 278 if (image.isNull() || !bubble_)
279 return; 279 return;
280 280
281 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&image); 281 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(image);
282 gtk_image_set_from_pixbuf(GTK_IMAGE(icon_), pixbuf); 282 gtk_image_set_from_pixbuf(GTK_IMAGE(icon_), pixbuf);
283 g_object_unref(pixbuf); 283 g_object_unref(pixbuf);
284 } 284 }
285 285
286 void SpeechRecognitionBubbleGtk::BubbleClosing(BubbleGtk* bubble, 286 void SpeechRecognitionBubbleGtk::BubbleClosing(BubbleGtk* bubble,
287 bool closed_by_escape) { 287 bool closed_by_escape) {
288 bubble_ = NULL; 288 bubble_ = NULL;
289 if (!did_invoke_close_) 289 if (!did_invoke_close_)
290 delegate_->InfoBubbleFocusChanged(); 290 delegate_->InfoBubbleFocusChanged();
291 } 291 }
292 292
293 } // namespace 293 } // namespace
294 294
295 SpeechRecognitionBubble* SpeechRecognitionBubble::CreateNativeBubble( 295 SpeechRecognitionBubble* SpeechRecognitionBubble::CreateNativeBubble(
296 WebContents* web_contents, 296 WebContents* web_contents,
297 Delegate* delegate, 297 Delegate* delegate,
298 const gfx::Rect& element_rect) { 298 const gfx::Rect& element_rect) {
299 return new SpeechRecognitionBubbleGtk(web_contents, delegate, element_rect); 299 return new SpeechRecognitionBubbleGtk(web_contents, delegate, element_rect);
300 } 300 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698