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

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

Issue 1081007: Implement ConfirmInfoBar link support on GTK... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « no previous file | chrome/browser/gtk/infobar_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) 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 #ifndef CHROME_BROWSER_GTK_INFOBAR_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_INFOBAR_GTK_H_
6 #define CHROME_BROWSER_GTK_INFOBAR_GTK_H_ 6 #define CHROME_BROWSER_GTK_INFOBAR_GTK_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "chrome/browser/gtk/slide_animator_gtk.h" 10 #include "chrome/browser/gtk/slide_animator_gtk.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // NotificationOPbserver implementation. 58 // NotificationOPbserver implementation.
59 virtual void Observe(NotificationType type, 59 virtual void Observe(NotificationType type,
60 const NotificationSource& source, 60 const NotificationSource& source,
61 const NotificationDetails& details); 61 const NotificationDetails& details);
62 62
63 protected: 63 protected:
64 // Removes our associated InfoBarDelegate from the associated TabContents. 64 // Removes our associated InfoBarDelegate from the associated TabContents.
65 // (Will lead to this InfoBar being closed). 65 // (Will lead to this InfoBar being closed).
66 void RemoveInfoBar() const; 66 void RemoveInfoBar() const;
67 67
68 // Adds |display_text| to the infobar. If |link_text| is not empty, it is
69 // rendered as a hyperlink and inserted into |display_text| at |link_offset|,
70 // or right aligned in the infobar if |link_offset| is |npos|. |link_padding|
71 // pixels are inserted around the link (pass 0 for not padding). If a link
72 // is supplied, |link_callback| must not be null. It will be invoked on click.
73 void AddLabelAndLink(const std::wstring& display_text,
74 const std::wstring& link,
75 size_t link_offset,
76 guint link_padding,
77 GCallback link_callback);
78
68 // The top level widget of the infobar. 79 // The top level widget of the infobar.
69 scoped_ptr<SlideAnimatorGtk> slide_widget_; 80 scoped_ptr<SlideAnimatorGtk> slide_widget_;
70 81
71 // The second highest level widget of the infobar. 82 // The second highest level widget of the infobar.
72 OwnedWidgetGtk border_bin_; 83 OwnedWidgetGtk border_bin_;
73 84
74 // The hbox that holds infobar elements (button, text, icon, etc.). 85 // The hbox that holds infobar elements (button, text, icon, etc.).
75 GtkWidget* hbox_; 86 GtkWidget* hbox_;
76 87
77 // The x that closes the bar. 88 // The x that closes the bar.
(...skipping 12 matching lines...) Expand all
90 101
91 private: 102 private:
92 static void OnCloseButton(GtkWidget* button, InfoBar* info_bar); 103 static void OnCloseButton(GtkWidget* button, InfoBar* info_bar);
93 104
94 void UpdateBorderColor(); 105 void UpdateBorderColor();
95 106
96 DISALLOW_COPY_AND_ASSIGN(InfoBar); 107 DISALLOW_COPY_AND_ASSIGN(InfoBar);
97 }; 108 };
98 109
99 #endif // CHROME_BROWSER_GTK_INFOBAR_GTK_H_ 110 #endif // CHROME_BROWSER_GTK_INFOBAR_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698