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

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

Issue 99166: Linux findbar improvements:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « chrome/browser/gtk/find_bar_gtk.cc ('k') | chrome/browser/gtk/tab_contents_container_gtk.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/infobar_gtk.h" 5 #include "chrome/browser/gtk/infobar_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/gfx/gtk_util.h" 9 #include "base/gfx/gtk_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 gtk_alignment_set_padding(GTK_ALIGNMENT(padding), 43 gtk_alignment_set_padding(GTK_ALIGNMENT(padding),
44 0, 0, kLeftPadding, kRightPadding); 44 0, 0, kLeftPadding, kRightPadding);
45 45
46 GtkWidget* bg_box = gtk_event_box_new(); 46 GtkWidget* bg_box = gtk_event_box_new();
47 gtk_container_add(GTK_CONTAINER(padding), hbox_); 47 gtk_container_add(GTK_CONTAINER(padding), hbox_);
48 gtk_container_add(GTK_CONTAINER(bg_box), padding); 48 gtk_container_add(GTK_CONTAINER(bg_box), padding);
49 49
50 // Set the top border and background color. 50 // Set the top border and background color.
51 gtk_widget_modify_bg(bg_box, GTK_STATE_NORMAL, &kBackgroundColor); 51 gtk_widget_modify_bg(bg_box, GTK_STATE_NORMAL, &kBackgroundColor);
52 border_bin_.Own(gfx::CreateGtkBorderBin(bg_box, &kBorderColor, 52 border_bin_.Own(gfx::CreateGtkBorderBin(bg_box, &kBorderColor,
53 1, 0, 0, 0)); 53 0, 1, 0, 0));
54 gtk_widget_set_size_request(border_bin_.get(), -1, kInfoBarHeight); 54 gtk_widget_set_size_request(border_bin_.get(), -1, kInfoBarHeight);
55 55
56 // Add the icon on the left, if any. 56 // Add the icon on the left, if any.
57 SkBitmap* icon = delegate->GetIcon(); 57 SkBitmap* icon = delegate->GetIcon();
58 if (icon) { 58 if (icon) {
59 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(icon); 59 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(icon);
60 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf); 60 GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf);
61 g_object_unref(pixbuf); 61 g_object_unref(pixbuf);
62 gtk_box_pack_start(GTK_BOX(hbox_), image, FALSE, FALSE, 0); 62 gtk_box_pack_start(GTK_BOX(hbox_), image, FALSE, FALSE, 0);
63 } 63 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { 228 InfoBar* LinkInfoBarDelegate::CreateInfoBar() {
229 return new LinkInfoBar(this); 229 return new LinkInfoBar(this);
230 } 230 }
231 231
232 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: -------------------------- 232 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: --------------------------
233 233
234 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() { 234 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() {
235 return new ConfirmInfoBar(this); 235 return new ConfirmInfoBar(this);
236 } 236 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/find_bar_gtk.cc ('k') | chrome/browser/gtk/tab_contents_container_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698