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

Side by Side Diff: chrome/browser/ui/gtk/infobars/infobar_container_gtk.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/infobars/infobar_container_gtk.h" 5 #include "chrome/browser/ui/gtk/infobars/infobar_container_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void InfoBarContainerGtk::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { 77 void InfoBarContainerGtk::PlatformSpecificRemoveInfoBar(InfoBar* infobar) {
78 InfoBarGtk* infobar_gtk = static_cast<InfoBarGtk*>(infobar); 78 InfoBarGtk* infobar_gtk = static_cast<InfoBarGtk*>(infobar);
79 gtk_container_remove(GTK_CONTAINER(widget()), infobar_gtk->widget()); 79 gtk_container_remove(GTK_CONTAINER(widget()), infobar_gtk->widget());
80 80
81 std::vector<InfoBarGtk*>::iterator it = 81 std::vector<InfoBarGtk*>::iterator it =
82 std::find(infobars_gtk_.begin(), infobars_gtk_.end(), infobar); 82 std::find(infobars_gtk_.begin(), infobars_gtk_.end(), infobar);
83 if (it != infobars_gtk_.end()) 83 if (it != infobars_gtk_.end())
84 infobars_gtk_.erase(it); 84 infobars_gtk_.erase(it);
85 85
86 MessageLoop::current()->DeleteSoon(FROM_HERE, infobar); 86 base::MessageLoop::current()->DeleteSoon(FROM_HERE, infobar);
87 } 87 }
88 88
89 void InfoBarContainerGtk::PlatformSpecificInfoBarStateChanged( 89 void InfoBarContainerGtk::PlatformSpecificInfoBarStateChanged(
90 bool is_animating) { 90 bool is_animating) {
91 // Force a redraw of all infobars since something has a new height and we 91 // Force a redraw of all infobars since something has a new height and we
92 // need to make sure we animate our arrows. 92 // need to make sure we animate our arrows.
93 for (std::vector<InfoBarGtk*>::iterator it = infobars_gtk_.begin(); 93 for (std::vector<InfoBarGtk*>::iterator it = infobars_gtk_.begin();
94 it != infobars_gtk_.end(); ++it) { 94 it != infobars_gtk_.end(); ++it) {
95 gtk_widget_queue_draw((*it)->widget()); 95 gtk_widget_queue_draw((*it)->widget());
96 } 96 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 SkCanvas& canvas = *canvas_paint.sk_canvas(); 188 SkCanvas& canvas = *canvas_paint.sk_canvas();
189 189
190 canvas.drawPath(path, paint); 190 canvas.drawPath(path, paint);
191 191
192 paint.setShader(NULL); 192 paint.setShader(NULL);
193 paint.setColor(SkColorSetA(gfx::GdkColorToSkColor(source->GetBorderColor()), 193 paint.setColor(SkColorSetA(gfx::GdkColorToSkColor(source->GetBorderColor()),
194 SkColorGetA(grad_colors[0]))); 194 SkColorGetA(grad_colors[0])));
195 paint.setStyle(SkPaint::kStroke_Style); 195 paint.setStyle(SkPaint::kStroke_Style);
196 canvas.drawPath(path, paint); 196 canvas.drawPath(path, paint);
197 } 197 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/infobars/after_translate_infobar_gtk.cc ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698