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

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

Issue 14241006: Eliminate InfoBarTabHelper. Make InfoBarService a concrete class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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) 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_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 signals_(new ui::GtkSignalRegistrar) { 58 signals_(new ui::GtkSignalRegistrar) {
59 } 59 }
60 60
61 InfoBarGtk::~InfoBarGtk() { 61 InfoBarGtk::~InfoBarGtk() {
62 } 62 }
63 63
64 void InfoBarGtk::InitWidgets() { 64 void InfoBarGtk::InitWidgets() {
65 DCHECK(owner()); 65 DCHECK(owner());
66 DCHECK(!theme_service_); 66 DCHECK(!theme_service_);
67 theme_service_ = GtkThemeService::GetFrom(Profile::FromBrowserContext( 67 theme_service_ = GtkThemeService::GetFrom(Profile::FromBrowserContext(
68 owner()->GetWebContents()->GetBrowserContext())); 68 owner()->web_contents()->GetBrowserContext()));
69 69
70 // Create |hbox_| and pad the sides. 70 // Create |hbox_| and pad the sides.
71 hbox_ = gtk_hbox_new(FALSE, kElementPadding); 71 hbox_ = gtk_hbox_new(FALSE, kElementPadding);
72 72
73 // Make the whole infor bar horizontally shrinkable. 73 // Make the whole infor bar horizontally shrinkable.
74 gtk_widget_set_size_request(hbox_, 0, -1); 74 gtk_widget_set_size_request(hbox_, 0, -1);
75 75
76 GtkWidget* padding = gtk_alignment_new(0, 0, 1, 1); 76 GtkWidget* padding = gtk_alignment_new(0, 0, 1, 1);
77 gtk_alignment_set_padding(GTK_ALIGNMENT(padding), 77 gtk_alignment_set_padding(GTK_ALIGNMENT(padding),
78 0, 0, kLeftPadding, kRightPadding); 78 0, 0, kLeftPadding, kRightPadding);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 const content::NotificationDetails& details) { 328 const content::NotificationDetails& details) {
329 DCHECK(widget()); 329 DCHECK(widget());
330 UpdateBorderColor(); 330 UpdateBorderColor();
331 } 331 }
332 332
333 void InfoBarGtk::OnChildSizeRequest(GtkWidget* expanded, 333 void InfoBarGtk::OnChildSizeRequest(GtkWidget* expanded,
334 GtkWidget* child, 334 GtkWidget* child,
335 GtkRequisition* requisition) { 335 GtkRequisition* requisition) {
336 requisition->height = -1; 336 requisition->height = -1;
337 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698