OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/gtk_signal.h" | 9 #include "app/gtk_signal.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 protected: | 66 protected: |
67 // Removes our associated InfoBarDelegate from the associated TabContents. | 67 // Removes our associated InfoBarDelegate from the associated TabContents. |
68 // (Will lead to this InfoBar being closed). | 68 // (Will lead to this InfoBar being closed). |
69 void RemoveInfoBar() const; | 69 void RemoveInfoBar() const; |
70 | 70 |
71 // Adds |display_text| to the infobar. If |link_text| is not empty, it is | 71 // Adds |display_text| to the infobar. If |link_text| is not empty, it is |
72 // rendered as a hyperlink and inserted into |display_text| at |link_offset|, | 72 // rendered as a hyperlink and inserted into |display_text| at |link_offset|, |
73 // or right aligned in the infobar if |link_offset| is |npos|. |link_padding| | 73 // or right aligned in the infobar if |link_offset| is |npos|. |link_padding| |
74 // pixels are inserted around the link (pass 0 for not padding). If a link | 74 // pixels are inserted around the link (pass 0 for not padding). If a link |
75 // is supplied, |link_callback| must not be null. It will be invoked on click. | 75 // is supplied, |link_callback| must not be null. It will be invoked on click. |
76 void AddLabelAndLink(const std::wstring& display_text, | 76 void AddLabelAndLink(const string16& display_text, |
77 const std::wstring& link, | 77 const string16& link, |
78 size_t link_offset, | 78 size_t link_offset, |
79 guint link_padding, | 79 guint link_padding, |
80 GCallback link_callback); | 80 GCallback link_callback); |
81 | 81 |
82 // Retrieves the component colors for the infobar's background | 82 // Retrieves the component colors for the infobar's background |
83 // gradient. (This varies by infobars and can be animated to change). | 83 // gradient. (This varies by infobars and can be animated to change). |
84 virtual void GetTopColor(InfoBarDelegate::Type type, | 84 virtual void GetTopColor(InfoBarDelegate::Type type, |
85 double* r, double* g, double *b); | 85 double* r, double* g, double *b); |
86 virtual void GetBottomColor(InfoBarDelegate::Type type, | 86 virtual void GetBottomColor(InfoBarDelegate::Type type, |
87 double* r, double* g, double *b); | 87 double* r, double* g, double *b); |
(...skipping 24 matching lines...) Expand all Loading... |
112 private: | 112 private: |
113 CHROMEGTK_CALLBACK_0(InfoBar, void, OnCloseButton); | 113 CHROMEGTK_CALLBACK_0(InfoBar, void, OnCloseButton); |
114 CHROMEGTK_CALLBACK_1(InfoBar, gboolean, OnBackgroundExpose, GdkEventExpose*); | 114 CHROMEGTK_CALLBACK_1(InfoBar, gboolean, OnBackgroundExpose, GdkEventExpose*); |
115 | 115 |
116 void UpdateBorderColor(); | 116 void UpdateBorderColor(); |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 118 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
119 }; | 119 }; |
120 | 120 |
121 #endif // CHROME_BROWSER_GTK_INFOBAR_GTK_H_ | 121 #endif // CHROME_BROWSER_GTK_INFOBAR_GTK_H_ |
OLD | NEW |