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

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

Issue 10860004: image-skia: Remove implicit conversion to SkBitmap on linux and chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « chrome/browser/ui/gtk/menu_gtk.cc ('k') | chrome/browser/ui/gtk/task_manager_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/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 gtk_widget_show(cancel_button_); 270 gtk_widget_show(cancel_button_);
271 } 271 }
272 } 272 }
273 } 273 }
274 274
275 void SpeechRecognitionBubbleGtk::UpdateImage() { 275 void SpeechRecognitionBubbleGtk::UpdateImage() {
276 gfx::ImageSkia image = icon_image(); 276 gfx::ImageSkia image = icon_image();
277 if (image.isNull() || !bubble_) 277 if (image.isNull() || !bubble_)
278 return; 278 return;
279 279
280 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(image); 280 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(*image.bitmap());
281 gtk_image_set_from_pixbuf(GTK_IMAGE(icon_), pixbuf); 281 gtk_image_set_from_pixbuf(GTK_IMAGE(icon_), pixbuf);
282 g_object_unref(pixbuf); 282 g_object_unref(pixbuf);
283 } 283 }
284 284
285 void SpeechRecognitionBubbleGtk::BubbleClosing(BubbleGtk* bubble, 285 void SpeechRecognitionBubbleGtk::BubbleClosing(BubbleGtk* bubble,
286 bool closed_by_escape) { 286 bool closed_by_escape) {
287 bubble_ = NULL; 287 bubble_ = NULL;
288 if (!did_invoke_close_) 288 if (!did_invoke_close_)
289 delegate_->InfoBubbleFocusChanged(); 289 delegate_->InfoBubbleFocusChanged();
290 } 290 }
291 291
292 } // namespace 292 } // namespace
293 293
294 SpeechRecognitionBubble* SpeechRecognitionBubble::CreateNativeBubble( 294 SpeechRecognitionBubble* SpeechRecognitionBubble::CreateNativeBubble(
295 WebContents* web_contents, 295 WebContents* web_contents,
296 Delegate* delegate, 296 Delegate* delegate,
297 const gfx::Rect& element_rect) { 297 const gfx::Rect& element_rect) {
298 return new SpeechRecognitionBubbleGtk(web_contents, delegate, element_rect); 298 return new SpeechRecognitionBubbleGtk(web_contents, delegate, element_rect);
299 } 299 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/menu_gtk.cc ('k') | chrome/browser/ui/gtk/task_manager_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698