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

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

Issue 9359052: GTK: Closing in on being completely GSEALed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/gtk_util.cc ('k') | chrome/browser/ui/gtk/location_bar_view_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/ui/gtk/infobars/infobar_gtk.h" 5 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/infobars/infobar_tab_helper.h" 9 #include "chrome/browser/infobars/infobar_tab_helper.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 gboolean InfoBarGtk::OnBackgroundExpose(GtkWidget* sender, 214 gboolean InfoBarGtk::OnBackgroundExpose(GtkWidget* sender,
215 GdkEventExpose* event) { 215 GdkEventExpose* event) {
216 TRACE_EVENT0("ui::gtk", "InfoBarGtk::OnBackgroundExpose"); 216 TRACE_EVENT0("ui::gtk", "InfoBarGtk::OnBackgroundExpose");
217 217
218 GtkAllocation allocation; 218 GtkAllocation allocation;
219 gtk_widget_get_allocation(sender, &allocation); 219 gtk_widget_get_allocation(sender, &allocation);
220 const int height = allocation.height; 220 const int height = allocation.height;
221 221
222 cairo_t* cr = gdk_cairo_create(GDK_DRAWABLE(sender->window)); 222 cairo_t* cr = gdk_cairo_create(gtk_widget_get_window(sender));
223 gdk_cairo_rectangle(cr, &event->area); 223 gdk_cairo_rectangle(cr, &event->area);
224 cairo_clip(cr); 224 cairo_clip(cr);
225 225
226 cairo_pattern_t* pattern = cairo_pattern_create_linear(0, 0, 0, height); 226 cairo_pattern_t* pattern = cairo_pattern_create_linear(0, 0, 0, height);
227 227
228 double top_r, top_g, top_b; 228 double top_r, top_g, top_b;
229 GetTopColor(delegate()->GetInfoBarType(), &top_r, &top_g, &top_b); 229 GetTopColor(delegate()->GetInfoBarType(), &top_r, &top_g, &top_b);
230 cairo_pattern_add_color_stop_rgb(pattern, 0.0, top_r, top_g, top_b); 230 cairo_pattern_add_color_stop_rgb(pattern, 0.0, top_r, top_g, top_b);
231 231
232 double bottom_r, bottom_g, bottom_b; 232 double bottom_r, bottom_g, bottom_b;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 const content::NotificationSource& source, 288 const content::NotificationSource& source,
289 const content::NotificationDetails& details) { 289 const content::NotificationDetails& details) {
290 UpdateBorderColor(); 290 UpdateBorderColor();
291 } 291 }
292 292
293 void InfoBarGtk::OnChildSizeRequest(GtkWidget* expanded, 293 void InfoBarGtk::OnChildSizeRequest(GtkWidget* expanded,
294 GtkWidget* child, 294 GtkWidget* child,
295 GtkRequisition* requisition) { 295 GtkRequisition* requisition) {
296 requisition->height = -1; 296 requisition->height = -1;
297 } 297 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.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