| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_GTK_INFOBAR_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBAR_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_INFOBAR_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_INFOBAR_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 // Adds |display_text| to the infobar. If |link_text| is not empty, it is | 94 // Adds |display_text| to the infobar. If |link_text| is not empty, it is |
| 95 // rendered as a hyperlink and inserted into |display_text| at |link_offset|, | 95 // rendered as a hyperlink and inserted into |display_text| at |link_offset|, |
| 96 // or right aligned in the infobar if |link_offset| is |npos|. If a link is | 96 // or right aligned in the infobar if |link_offset| is |npos|. If a link is |
| 97 // supplied, |link_callback| must not be null. It will be invoked on click. | 97 // supplied, |link_callback| must not be null. It will be invoked on click. |
| 98 void AddLabelWithInlineLink(const string16& display_text, | 98 void AddLabelWithInlineLink(const string16& display_text, |
| 99 const string16& link_text, | 99 const string16& link_text, |
| 100 size_t link_offset, | 100 size_t link_offset, |
| 101 GCallback callback); | 101 GCallback callback); |
| 102 | 102 |
| 103 // Adds |display_text| to the infobar. If |link_text| is not empty, it is | |
| 104 // right aligned in the infobar. | |
| 105 void AddLabelAndLink(const string16& display_text, | |
| 106 const string16& link_text, | |
| 107 GCallback callback); | |
| 108 // The top level widget of the infobar. | 103 // The top level widget of the infobar. |
| 109 scoped_ptr<SlideAnimatorGtk> slide_widget_; | 104 scoped_ptr<SlideAnimatorGtk> slide_widget_; |
| 110 | 105 |
| 111 // The second highest widget in the hierarchy (after the slide widget). | 106 // The second highest widget in the hierarchy (after the slide widget). |
| 112 GtkWidget* bg_box_; | 107 GtkWidget* bg_box_; |
| 113 | 108 |
| 114 // The hbox that holds infobar elements (button, text, icon, etc.). | 109 // The hbox that holds infobar elements (button, text, icon, etc.). |
| 115 GtkWidget* hbox_; | 110 GtkWidget* hbox_; |
| 116 | 111 |
| 117 // The x that closes the bar. | 112 // The x that closes the bar. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 135 private: | 130 private: |
| 136 CHROMEGTK_CALLBACK_0(InfoBar, void, OnCloseButton); | 131 CHROMEGTK_CALLBACK_0(InfoBar, void, OnCloseButton); |
| 137 CHROMEGTK_CALLBACK_1(InfoBar, gboolean, OnBackgroundExpose, GdkEventExpose*); | 132 CHROMEGTK_CALLBACK_1(InfoBar, gboolean, OnBackgroundExpose, GdkEventExpose*); |
| 138 | 133 |
| 139 void UpdateBorderColor(); | 134 void UpdateBorderColor(); |
| 140 | 135 |
| 141 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 136 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
| 142 }; | 137 }; |
| 143 | 138 |
| 144 #endif // CHROME_BROWSER_UI_GTK_INFOBAR_GTK_H_ | 139 #endif // CHROME_BROWSER_UI_GTK_INFOBAR_GTK_H_ |
| OLD | NEW |